mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
`render nothing: true` has been deprecated. For more information see [pr](https://github.com/rails/rails/pull/20336)
18 lines
427 B
Ruby
18 lines
427 B
Ruby
class Admin::SpamLogsController < Admin::ApplicationController
|
|
def index
|
|
@spam_logs = SpamLog.order(id: :desc).page(params[:page])
|
|
end
|
|
|
|
def destroy
|
|
spam_log = SpamLog.find(params[:id])
|
|
|
|
if params[:remove_user]
|
|
spam_log.remove_user
|
|
redirect_to admin_spam_logs_path, notice: "User #{spam_log.user.username} was successfully removed."
|
|
else
|
|
spam_log.destroy
|
|
head :ok
|
|
end
|
|
end
|
|
end
|