From 39dd39e9e33800d8d9313386061e1c234bd083a3 Mon Sep 17 00:00:00 2001 From: Pistos Date: Sat, 15 Oct 2011 00:07:12 -0400 Subject: [PATCH] Refactor: Remove superfluous local variable. --- app/helpers/comments_helper.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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