diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 192b2891a..541fa083b 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -6,11 +6,10 @@ module CommentsHelper GSUB_THIS = "FIUSDHVIUSHDVIUBAIUHAPOIUXJM" def comment_toggle(post, commenting_disabled=false) if post.comments.size <= 3 - str = link_to "#{t('stream_helper.hide_comments')}", post_comments_path(post.id), :class => "toggle_post_comments" + link_to "#{t('stream_helper.hide_comments')}", post_comments_path(post.id), :class => "toggle_post_comments" else - str = link_to "#{t('stream_helper.show_more_comments', :number => post.comments.size - 3)}", post_comments_path(post.id), :class => "toggle_post_comments" + link_to "#{t('stream_helper.show_more_comments', :number => post.comments.size - 3)}", post_comments_path(post.id), :class => "toggle_post_comments" end - str end # This method memoizes the new comment form in order to avoid the overhead of rendering it on every post. @@ -37,7 +36,7 @@ module CommentsHelper @commenting_disabled elsif defined?(@stream) !@stream.can_comment?(post) - else + else false end end