2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
class SpamLog < ApplicationRecord
|
2016-04-02 18:10:28 +05:30
|
|
|
belongs_to :user
|
|
|
|
|
|
|
|
validates :user, presence: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def remove_user(deleted_by:)
|
2017-09-10 17:25:29 +05:30
|
|
|
user.delete_async(deleted_by: deleted_by, params: { 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
|
2020-03-09 13:42:32 +05:30
|
|
|
|
|
|
|
def self.verify_recaptcha!(id:, user_id:)
|
|
|
|
find_by(id: id, user_id: user_id)&.update!(recaptcha_verified: true)
|
|
|
|
end
|
2016-04-02 18:10:28 +05:30
|
|
|
end
|