diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-08 13:39:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 13:39:49 +0100 |
commit | 1c6588accca23599ea1537ec527a5be04408b2af (patch) | |
tree | fd0b7af844699dc38829e776ff5a42987b6b1193 /app/models/instance_filter.rb | |
parent | 9a38357111049c7587c898b2b623cf9c853a4d35 (diff) |
Redesign admin instances area (#9645)
Diffstat (limited to 'app/models/instance_filter.rb')
-rw-r--r-- | app/models/instance_filter.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/app/models/instance_filter.rb b/app/models/instance_filter.rb index 5073cf1fa..3483d8cd6 100644 --- a/app/models/instance_filter.rb +++ b/app/models/instance_filter.rb @@ -8,21 +8,10 @@ class InstanceFilter end def results - scope = Account.remote.by_domain_accounts - params.each do |key, value| - scope.merge!(scope_for(key, value)) if value.present? - end - scope - end - - private - - def scope_for(key, value) - case key.to_s - when 'domain_name' - Account.matches_domain(value) + if params[:limited].present? + DomainBlock.order(id: :desc) else - raise "Unknown filter: #{key}" + Account.remote.by_domain_accounts end end end |