Fix specs.
This commit is contained in:
parent
35a0c56346
commit
fae9aee425
2 changed files with 6 additions and 2 deletions
|
|
@ -42,4 +42,8 @@ module CommentsHelper
|
|||
false
|
||||
end
|
||||
end
|
||||
|
||||
def all_comments?
|
||||
defined?(request_parameters) && !! params['all_comments']
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
.comment_stream
|
||||
- unless comments_expanded || params['all_comments']
|
||||
- unless comments_expanded || all_comments?
|
||||
%ul.show_comments{:class => ("hidden" if post.comments.size <= 3)}
|
||||
%li
|
||||
= comment_toggle( post)
|
||||
|
||||
%ul.comments{:class => ('loaded' if post.comments.size <= 3)}
|
||||
-if post.comments.size > 3 && !comments_expanded && ! params['all_comments']
|
||||
-if post.comments.size > 3 && !comments_expanded && ! all_comments?
|
||||
= render :partial => 'comments/comment', :collection => post.comments.last(3), :locals => {:post => post}
|
||||
-else
|
||||
= render :partial => 'comments/comment', :collection => post.comments, :locals => {:post => post}
|
||||
|
|
|
|||
Loading…
Reference in a new issue