gitlab-org--gitlab-foss/app/models/spam_log.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
416 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class SpamLog < ApplicationRecord
belongs_to :user
validates :user, presence: true
def remove_user(deleted_by:)
2017-06-02 09:18:24 -04:00
user.delete_async(deleted_by: deleted_by, params: { hard_delete: true })
end
def text
[title, description].join("\n")
end
def self.verify_recaptcha!(id:, user_id:)
find_by(id: id, user_id: user_id)&.update!(recaptcha_verified: true)
end
end