Class: Settings::ReportsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Settings::ReportsController
- Defined in:
- app/controllers/settings/reports_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 |
# File 'app/controllers/settings/reports_controller.rb', line 5 def index @reports = policy_scope(Federails::Moderation::Report).where(resolution: nil) render layout: "settings" end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/settings/reports_controller.rb', line 10 def show render layout: "settings" end |
#update ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/settings/reports_controller.rb', line 14 def update if params[:resolve] @report.resolve! redirect_to settings_reports_path, notice: t(".resolved") elsif params[:ignore] @report.ignore! redirect_to settings_reports_path, notice: t(".ignored") else redirect_to settings_report_path(@report) end end |