Class: Admin::AbuseReportsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/abuse_reports_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject


6
7
8
9
10
11
12
13
# File 'app/controllers/admin/abuse_reports_controller.rb', line 6

def destroy
  abuse_report = AbuseReport.find(params[:id])

  abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
  abuse_report.destroy

  render nothing: true
end

#indexObject


2
3
4
# File 'app/controllers/admin/abuse_reports_controller.rb', line 2

def index
  @abuse_reports = AbuseReport.order(id: :desc).page(params[:page])
end