gitlab-org--gitlab-foss/app/controllers/admin/abuse_reports_controller.rb
Dmitriy Zaporozhets e02b7bf443
Improve abuse reports management
* Link to user profile instead of user admin page
* One button for remove user and report
* Remove user and report with page reloading

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-25 10:52:10 +02:00

16 lines
349 B
Ruby

class Admin::AbuseReportsController < Admin::ApplicationController
def index
@abuse_reports = AbuseReport.order(id: :desc).page(params[:page])
end
def destroy
abuse_report = AbuseReport.find(params[:id])
if params[:remove_user]
abuse_report.user.destroy
end
abuse_report.destroy
render nothing: true
end
end