Explicitly specify order of comments, since we cannot assume MySQL ordering (which is by id).

This commit is contained in:
Pistos 2011-10-08 22:59:44 -04:00
parent 583dd20249
commit cd3e824bc1

View file

@ -11,7 +11,7 @@
-if post.comments.size > 3 && !comments_expanded
= render :partial => 'comments/comment', :collection => post.last_three_comments, :locals => {:post => post}
-else
= render :partial => 'comments/comment', :collection => post.comments, :locals => {:post => post}
= render :partial => 'comments/comment', :collection => post.comments.order('created_at'), :locals => {:post => post}
- unless commenting_disabled?(post)
.new_comment_form_wrapper{:class => comment_form_wrapper_class(post)}