diff options
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 28ba35148..f50be9d4c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -122,6 +122,7 @@ class Account < ApplicationRecord scope :popular, -> { order('account_stats.followers_count desc') } scope :without_hidden, -> { where(hidden: false) } scope :without_unlisted, -> { where(unlisted: false) } + scope :by_domain_and_subdomains, ->(domain) { where(domain: domain).or(where(arel_table[:domain].matches('%.' + domain))) } delegate :email, :unconfirmed_email, |