diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-26 19:20:01 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-02 11:25:44 -0200 |
commit | 718b1dddfe8d7422e8de8b2fbbd8357fc1c3b5e4 (patch) | |
tree | 13950c0ea38a77ff198e038ce32a093801f99a06 /app/models/spam_log.rb | |
parent | a2bbf004779db402e67a918db893c166502f5050 (diff) | |
download | gitlab-ce-718b1dddfe8d7422e8de8b2fbbd8357fc1c3b5e4.tar.gz |
Refactor Admin::SpamLogsController to block user before destroying
Diffstat (limited to 'app/models/spam_log.rb')
-rw-r--r-- | app/models/spam_log.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/spam_log.rb b/app/models/spam_log.rb index b7b32b478a7..12df68ef83b 100644 --- a/app/models/spam_log.rb +++ b/app/models/spam_log.rb @@ -2,4 +2,9 @@ class SpamLog < ActiveRecord::Base belongs_to :user validates :user, presence: true + + def remove_user + user.block + user.destroy + end end |