FIX: order post_actions by date

This commit is contained in:
Sam 2015-05-28 16:16:36 +10:00
parent 1e4c7dfbe7
commit bddbf70697
1 changed files with 3 additions and 1 deletions

View File

@ -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