about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKurtis Rainbolt-Greene <me@kurtisrainboltgreene.name>2017-01-07 17:55:40 -0800
committerGitHub <noreply@github.com>2017-01-07 17:55:40 -0800
commite5d9009d710ae6516e45789059e45118e9a0cb5d (patch)
treeee5dd08db2a10a85390de45a3b7d6412c3418480
parent7a0a13ab53eda1c7ccdfb5176fecd61dcf1ad93f (diff)
Using "rails style" order arguments
-rw-r--r--app/models/account.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 5c1f6e7c1..41fcc864b 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -62,8 +62,8 @@ class Account < ApplicationRecord
   scope :expiring, ->(time) { where(subscription_expires_at: nil).or(where('subscription_expires_at < ?', time)).remote.with_followers }
   scope :silenced, -> { where(silenced: true) }
   scope :suspended, -> { where(suspended: true) }
-  scope :recent, -> { reorder('id desc') }
-  scope :alphabetic, -> { order('domain ASC, username ASC') }
+  scope :recent, -> { reorder(id: :desc) }
+  scope :alphabetic, -> { order(domain: :asc, username: :asc) }
 
   def follow!(other_account)
     active_relationships.where(target_account: other_account).first_or_create!(target_account: other_account)