闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
282 B

  1. # frozen_string_literal: true
  2. class Mention < ApplicationRecord
  3. belongs_to :account, inverse_of: :mentions, required: true
  4. belongs_to :status, required: true
  5. has_one :notification, as: :activity, dependent: :destroy
  6. validates :account, uniqueness: { scope: :status }
  7. end