Refactor: Remove superfluous local variable.
This commit is contained in:
parent
e0ee200eb7
commit
39dd39e9e3
1 changed files with 3 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue