Files
grecia/app/controllers/moderation/proposal_notifications_controller.rb
iagirre 21b1d00205 Add backend for the moderators
Add new routes for the proposal notifications edition and
abilities to let moderators edit it (mark as ignored, hide, etc.).

The notifications are not flaggable because they doesn't work like that,
but in a similar way. The moderator/administrator is in charge of hidding
them through the UI, so the normal users don't flag it as inappropriate.

New controller Moderation::ProposalNotification to manage the moderators
work.
2018-07-02 18:17:45 +02:00

25 lines
528 B
Ruby

class Moderation::ProposalNotificationsController < Moderation::BaseController
include ModerateActions
has_filters %w{pending_review all ignored}, only: :index
has_orders %w{created_at moderated}, only: :index
before_action :load_resources, only: [:index, :moderate]
load_and_authorize_resource
def hide
ProposalNotification.find(params[:id]).update(moderated: true)
end
private
def resource_name
'proposal_notification'
end
def resource_model
ProposalNotification
end
end