From bddbf7069728ddc3d8bc6376d872fb693c2a77a5 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 28 May 2015 16:16:36 +1000 Subject: [PATCH] FIX: order post_actions by date --- app/controllers/post_actions_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/post_actions_controller.rb b/app/controllers/post_actions_controller.rb index 5d76ff113b2..46e7159e6cd 100644 --- a/app/controllers/post_actions_controller.rb +++ b/app/controllers/post_actions_controller.rb @@ -29,7 +29,9 @@ class PostActionsController < ApplicationController def users guardian.ensure_can_see_post_actors!(@post.topic, @post_action_type_id) - post_actions = @post.post_actions.where(post_action_type_id: @post_action_type_id).includes(:user) + post_actions = @post.post_actions.where(post_action_type_id: @post_action_type_id) + .includes(:user) + .order('post_actions.created_at asc') render_serialized(post_actions.to_a, PostActionUserSerializer) end