abuse_reports_controller.rb 349 Bytes
Newer Older
1 2 3 4 5 6
class Admin::AbuseReportsController < Admin::ApplicationController
  def index
    @abuse_reports = AbuseReport.order(id: :desc).page(params[:page])
  end

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

9 10 11 12 13 14
    if params[:remove_user]
      abuse_report.user.destroy
    end

    abuse_report.destroy
    render nothing: true
15 16
  end
end