debian-mirror-gitlab/app/models/spam_log.rb

15 lines
310 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
class SpamLog < ActiveRecord::Base
belongs_to :user
validates :user, presence: true
2017-08-17 22:00:37 +05:30
def remove_user(deleted_by:)
2016-04-02 18:10:28 +05:30
user.block
2017-08-17 22:00:37 +05:30
DeleteUserWorker.perform_async(deleted_by.id, user.id, delete_solo_owned_groups: true, hard_delete: true)
2016-04-02 18:10:28 +05:30
end
2016-09-13 17:45:13 +05:30
def text
[title, description].join("\n")
end
2016-04-02 18:10:28 +05:30
end