summaryrefslogtreecommitdiff
path: root/app/models/spam_log.rb
blob: 5b9ece8373fd9b48531bd3b7bdea6f8ece7c1ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class SpamLog < ApplicationRecord
  belongs_to :user

  validates :user, presence: true

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

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