Add Account.without_internal
scope (#29559)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
acf3f410ae
commit
c09b8a7164
4 changed files with 7 additions and 6 deletions
|
@ -111,6 +111,7 @@ class Account < ApplicationRecord
|
|||
|
||||
normalizes :username, with: ->(username) { username.squish }
|
||||
|
||||
scope :without_internal, -> { where(id: 1...) }
|
||||
scope :remote, -> { where.not(domain: nil) }
|
||||
scope :local, -> { where(domain: nil) }
|
||||
scope :partitioned, -> { order(Arel.sql('row_number() over (partition by domain)')) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue