Files
danbooru/app/controllers/moderator/post/queues_controller.rb
r888888888 1d9596d7f2 fixes #2417
2015-06-29 18:17:59 -07:00

17 lines
531 B
Ruby

module Moderator
module Post
class QueuesController < ApplicationController
respond_to :html, :json
before_filter :post_approvers_only
def show
::Post.without_timeout do
@posts = ::Post.order("posts.id asc").pending_or_flagged.available_for_moderation(params[:hidden]).search(:tag_match => "#{params[:query]} status:any").paginate(params[:page], :limit => 100)
@posts.each # hack to force rails to eager load
end
respond_with(@posts)
end
end
end
end