2015-08-06 09:08:22 -04:00
|
|
|
class Admin::AbuseReportsController < Admin::ApplicationController
|
|
|
|
def index
|
|
|
|
@abuse_reports = AbuseReport.order(id: :desc).page(params[:page])
|
2017-03-31 00:47:22 -04:00
|
|
|
@abuse_reports.includes(:reporter, :user)
|
2015-08-06 09:08:22 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
2015-08-25 04:52:10 -04:00
|
|
|
abuse_report = AbuseReport.find(params[:id])
|
2015-08-06 09:08:22 -04:00
|
|
|
|
2016-03-12 07:11:30 -05:00
|
|
|
abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
|
2015-08-25 04:52:10 -04:00
|
|
|
abuse_report.destroy
|
2016-01-12 20:48:16 -05:00
|
|
|
|
2016-03-15 21:16:25 -04:00
|
|
|
head :ok
|
2015-08-06 09:08:22 -04:00
|
|
|
end
|
|
|
|
end
|