Class: SpamLog

Inherits:
ApplicationRecord show all
Defined in:
app/models/spam_log.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order

Class Method Details

.verify_recaptcha!(id:, user_id:) ⇒ Object


16
17
18
# File 'app/models/spam_log.rb', line 16

def self.verify_recaptcha!(id:, user_id:)
  find_by(id: id, user_id: user_id)&.update!(recaptcha_verified: true)
end

Instance Method Details

#remove_user(deleted_by:) ⇒ Object


8
9
10
# File 'app/models/spam_log.rb', line 8

def remove_user(deleted_by:)
  user.delete_async(deleted_by: deleted_by, params: { hard_delete: true })
end

#textObject


12
13
14
# File 'app/models/spam_log.rb', line 12

def text
  [title, description].join("\n")
end