diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 27829fa08..9eadda027 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -296,9 +296,9 @@ class ApplicationController < ActionController::Base end def find_contest_from_association - render_404 unless @contest.present? + render_404 unless @object.present? - @contest = @contest.contest + @contest =@object.contest end def find_model_object diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index f4354a099..195257237 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -48,7 +48,7 @@ <%= l :label_update_time %>  <%= format_time(contestnotifications.created_at) %> - <%= link_to l(:label_project_newother), contest_contestnotification_path(@contest, contestnotifications) %><%= "(#{l(:label_x_comments, :count => contestnotifications.notificationcomments_count)})" if(contestnotifications.notificationcomments_count >= 0)%> + <%= link_to l(:label_project_newother), contest_contestnotification_path(@contest, contestnotifications) %><%#= "(#{l(:label_x_comments, :count => contestnotifications.notificationcomments_count)})" if contestnotifications.notificationcomments_count >= 0 %> diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 58b3aa43f..4dfa21d52 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -64,7 +64,7 @@ <%= l :label_update_time %> : <%= format_time(news.created_on) %> - + <%= link_to l(:label_project_newother), news_path(news) %><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %>