do includes before last(3), as last() returns an array, not an AR object
This commit is contained in:
parent
3cfa0c4602
commit
39b6abaa88
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
%ul.comments{:class => ('loaded' if post.comments.size <= 3)}
|
%ul.comments{:class => ('loaded' if post.comments.size <= 3)}
|
||||||
-if post.comments.size > 3 && !comments_expanded && ! all_comments?
|
-if post.comments.size > 3 && !comments_expanded && ! all_comments?
|
||||||
= render :partial => 'comments/comment', :collection => post.comments.last(3).including_author, :locals => {:post => post}
|
= render :partial => 'comments/comment', :collection => post.comments.including_author.last(3), :locals => {:post => post}
|
||||||
-else
|
-else
|
||||||
= render :partial => 'comments/comment', :collection => post.comments.including_author, :locals => {:post => post}
|
= render :partial => 'comments/comment', :collection => post.comments.including_author, :locals => {:post => post}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue