From fed54c176e26f03bca0742ebca686d6345fb9a61 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Sat, 29 Mar 2014 22:47:59 +0000 Subject: [PATCH] Using variable instead of new call to db --- app/views/content_viewer/view_page.rhtml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/views/content_viewer/view_page.rhtml b/app/views/content_viewer/view_page.rhtml index 9a36ba6..77d7623 100644 --- a/app/views/content_viewer/view_page.rhtml +++ b/app/views/content_viewer/view_page.rhtml @@ -80,11 +80,9 @@ <% end %> - <% if @page.accept_comments? && @comments.count > 1 %> + <% if @page.accept_comments? && @comments_count > 1 %> <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %> - <% end %> - <% if @page.accept_comments? and @comments.count > 1 %> <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %> <%= javascript_include_tag "comment_order.js" %>
-- libgit2 0.21.2