logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 4447c4c7c8bec66b8aa953221c61b8f7d5d64053
parent: 7a0a13ab53eda1c7ccdfb5176fecd61dcf1ad93f
Author: Eugen <eugen@zeonfederated.com>
Date:   Sun,  8 Jan 2017 02:58:19 +0100

Merge pull request #435 from krainboltgreene/patch-1

Using "rails style" order arguments

Diffstat:

Mapp/models/account.rb4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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)