mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Tidy up association declaration in Instance
model (#28880)
This commit is contained in:
parent
9c5be13980
commit
38f7f8b909
1 changed files with 3 additions and 3 deletions
|
@ -13,12 +13,12 @@ class Instance < ApplicationRecord
|
|||
|
||||
attr_accessor :failure_days
|
||||
|
||||
has_many :accounts, foreign_key: :domain, primary_key: :domain, inverse_of: false
|
||||
|
||||
with_options foreign_key: :domain, primary_key: :domain, inverse_of: false do
|
||||
belongs_to :domain_block
|
||||
belongs_to :domain_allow
|
||||
belongs_to :unavailable_domain # skipcq: RB-RL1031
|
||||
belongs_to :unavailable_domain
|
||||
|
||||
has_many :accounts, dependent: nil
|
||||
end
|
||||
|
||||
scope :searchable, -> { where.not(domain: DomainBlock.select(:domain)) }
|
||||
|
|
Loading…
Reference in a new issue