about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-04 16:05:38 +0200
committerGitHub <noreply@github.com>2018-10-04 16:05:38 +0200
commite645ae95610fcb69d15366bc32ab60014d2ebdcf (patch)
treeccda1dfdcf18db58aa38dd0565952dfa6e2822ca /app/models
parent7fe137d2f7792ed735be11eaca6d87fbc114043a (diff)
Change admin accounts default sort to most recent (#8813)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account_filter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/account_filter.rb b/app/models/account_filter.rb
index dc7a03039..84364bf1b 100644
--- a/app/models/account_filter.rb
+++ b/app/models/account_filter.rb
@@ -8,7 +8,7 @@ class AccountFilter
   end
 
   def results
-    scope = Account.alphabetic
+    scope = Account.recent
 
     params.each do |key, value|
       scope.merge!(scope_for(key, value)) if value.present?
@@ -29,8 +29,8 @@ class AccountFilter
       Account.where(domain: value)
     when 'silenced'
       Account.silenced
-    when 'recent'
-      Account.recent
+    when 'alphabetic'
+      Account.reorder(nil).alphabetic
     when 'suspended'
       Account.suspended
     when 'username'