diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-04-17 13:50:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 13:50:48 +0200 |
commit | bb58fc003b5d9ac521a89e7f37c0b7fc1d45a4c9 (patch) | |
tree | 45972e18f403bdfcf930d3378470e6fade89cda0 | |
parent | 727917e91eea3582586d3ce710826ef33ae26ffb (diff) |
Fix warning about using SQL in order for Account#partitioned (#7159)
-rw-r--r-- | app/models/account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 05e817f63..a3436b47c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -114,7 +114,7 @@ class Account < ApplicationRecord scope :without_followers, -> { where(followers_count: 0) } scope :with_followers, -> { where('followers_count > 0') } scope :expiring, ->(time) { remote.where.not(subscription_expires_at: nil).where('subscription_expires_at < ?', time) } - scope :partitioned, -> { order('row_number() over (partition by domain)') } + scope :partitioned, -> { order(Arel.sql('row_number() over (partition by domain)')) } scope :silenced, -> { where(silenced: true) } scope :suspended, -> { where(suspended: true) } scope :recent, -> { reorder(id: :desc) } |