diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-02-19 20:18:40 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-02-19 20:18:40 +0100 |
commit | ff0576cc2b046694dd8960608ce2f40e32a0ab78 (patch) | |
tree | 766b37f3f093f3882aba2258ebc2748325edcfcb /app/models/instance_filter.rb | |
parent | 896beb16c5318b8ce59867a06545ae6a00ccc84c (diff) | |
parent | 8e7fc7ec73c0743df378403ad2e704c9fae70400 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/instance_filter.rb')
-rw-r--r-- | app/models/instance_filter.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/instance_filter.rb b/app/models/instance_filter.rb index 3483d8cd6..848fff53e 100644 --- a/app/models/instance_filter.rb +++ b/app/models/instance_filter.rb @@ -9,9 +9,13 @@ class InstanceFilter def results if params[:limited].present? - DomainBlock.order(id: :desc) + scope = DomainBlock + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.order(id: :desc) else - Account.remote.by_domain_accounts + scope = Account.remote + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.by_domain_accounts end end end |