2016-01-09 14:30:34 -05:00
|
|
|
class SpamLog < ActiveRecord::Base
|
|
|
|
belongs_to :user
|
|
|
|
|
|
|
|
validates :user, presence: true
|
2016-01-26 16:20:01 -05:00
|
|
|
|
2017-04-16 17:54:41 -04:00
|
|
|
def remove_user(deleted_by:)
|
2016-01-26 16:20:01 -05:00
|
|
|
user.block
|
2017-04-16 17:54:41 -04:00
|
|
|
DeleteUserWorker.perform_async(deleted_by.id, user.id, delete_solo_owned_groups: true, hard_delete: true)
|
2016-01-26 16:20:01 -05:00
|
|
|
end
|
2016-08-01 13:14:03 -04:00
|
|
|
|
|
|
|
def text
|
|
|
|
[title, description].join("\n")
|
|
|
|
end
|
2016-01-09 14:30:34 -05:00
|
|
|
end
|