pundit: convert modqueue to pundit.

This commit is contained in:
evazion
2020-03-17 22:51:45 -05:00
parent 3d72e62c77
commit 19817a6f85
2 changed files with 6 additions and 1 deletions

View File

@@ -1,9 +1,9 @@
class ModqueueController < ApplicationController
respond_to :html, :json, :xml
before_action :approver_only
layout "sidebar"
def index
authorize :modqueue
@posts = Post.includes(:appeals, :disapprovals, :uploader, flags: [:creator]).pending_or_flagged.available_for_moderation(search_params[:hidden])
@posts = @posts.paginated_search(params, order: "modqueue", count_pages: true)