FIX: Queued Posts should be ordered by created_at

This commit is contained in:
Robin Ward 2015-09-18 13:11:42 -04:00
parent c9e8dd87e5
commit e7af8d2239

View File

@ -8,7 +8,7 @@ class QueuedPostsController < ApplicationController
state = QueuedPost.states[(params[:state] || 'new').to_sym]
state ||= QueuedPost.states[:new]
@queued_posts = QueuedPost.visible.where(state: state).includes(:topic, :user)
@queued_posts = QueuedPost.visible.where(state: state).includes(:topic, :user).order(:created_at)
render_serialized(@queued_posts,
QueuedPostSerializer,
root: :queued_posts,