Remove the nag message when an approver hasn't approved anything
recently. Also remove the modqueue random posts page. As of 3d410398a,
inactive approvers are now warned via dmails.
18 lines
469 B
Ruby
18 lines
469 B
Ruby
class PostApprovalsController < ApplicationController
|
|
before_action :approver_only, only: [:create]
|
|
respond_to :html, :xml, :json, :js
|
|
|
|
def create
|
|
post = Post.find(params[:post_id])
|
|
@approval = post.approve!
|
|
respond_with(@approval)
|
|
end
|
|
|
|
def index
|
|
@post_approvals = PostApproval.paginated_search(params)
|
|
@post_approvals = @post_approvals.includes(:user, post: :uploader) if request.format.html?
|
|
|
|
respond_with(@post_approvals)
|
|
end
|
|
end
|