Skip to content
Snippets Groups Projects
Unverified Commit bb58fc00 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix warning about using SQL in order for Account#partitioned (#7159)

parent 727917e9
No related branches found
No related tags found
No related merge requests found
......@@ -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) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment