FIX: Queued Posts should be ordered by `created_at`
This commit is contained in:
parent
c9e8dd87e5
commit
e7af8d2239
|
@ -8,7 +8,7 @@ class QueuedPostsController < ApplicationController
|
||||||
state = QueuedPost.states[(params[:state] || 'new').to_sym]
|
state = QueuedPost.states[(params[:state] || 'new').to_sym]
|
||||||
state ||= QueuedPost.states[:new]
|
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,
|
render_serialized(@queued_posts,
|
||||||
QueuedPostSerializer,
|
QueuedPostSerializer,
|
||||||
root: :queued_posts,
|
root: :queued_posts,
|
||||||
|
|
Loading…
Reference in New Issue