From 75d3b1598ff8a1e527e6cf155660ee813c03e587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Thu, 22 Aug 2013 16:21:51 +0200 Subject: [PATCH] make sure comments are sorted in ascending order from oldest to newest in the SPV --- app/presenters/post_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index db4fdf90b..42fe3157c 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -99,7 +99,7 @@ class PostInteractionPresenter { :likes => as_api(@post.likes), :reshares => PostPresenter.collection_json(@post.reshares, @current_user), - :comments => CommentPresenter.as_collection(@post.comments), + :comments => CommentPresenter.as_collection(@post.comments.order('created_at ASC')), :participations => as_api(@post.participations) } end