about summary refs log tree commit diff
path: root/app/models/mention.rb
blob: 10a9cb1cd1a39a564aa4f296f303893daf795632 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class Mention < ApplicationRecord
  belongs_to :account, inverse_of: :mentions
  belongs_to :status

  has_one :notification, as: :activity, dependent: :destroy

  validates :account, :status, presence: true
  validates :account, uniqueness: { scope: :status }
end