|
|
|
@ -84,6 +84,7 @@ class Status < ApplicationRecord
|
|
|
|
has_many :mentions, dependent: :destroy, inverse_of: :status
|
|
|
|
has_many :mentions, dependent: :destroy, inverse_of: :status
|
|
|
|
has_many :mentioned_accounts, through: :mentions, source: :account, class_name: 'Account'
|
|
|
|
has_many :mentioned_accounts, through: :mentions, source: :account, class_name: 'Account'
|
|
|
|
has_many :media_attachments, dependent: :nullify
|
|
|
|
has_many :media_attachments, dependent: :nullify
|
|
|
|
|
|
|
|
has_many :quotes, foreign_key: 'quoted_status_id', inverse_of: :quoted_status, dependent: :nullify
|
|
|
|
|
|
|
|
|
|
|
|
# The `dependent` option is enabled by the initial `mentions` association declaration
|
|
|
|
# The `dependent` option is enabled by the initial `mentions` association declaration
|
|
|
|
has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status # rubocop:disable Rails/HasManyOrHasOneDependent
|
|
|
|
has_many :active_mentions, -> { active }, class_name: 'Mention', inverse_of: :status # rubocop:disable Rails/HasManyOrHasOneDependent
|
|
|
|
|