mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:53:41 +08:00
DEV: Remove this chained user scope (#17029)
This reverts one of the changes introduced just now in:
27d7b0c6de
I don't think we need this `activated_not_suspended_not_staged` scope
because we can just compose it ourselves via method chaining like
`User.activated.not_suspended.not_staged`.
This commit is contained in:
parent
27d7b0c6de
commit
3941bad075
|
@ -221,7 +221,6 @@ class User < ActiveRecord::Base
|
|||
scope :not_suspended, -> { where('suspended_till IS NULL OR suspended_till <= ?', Time.zone.now) }
|
||||
scope :activated, -> { where(active: true) }
|
||||
scope :not_staged, -> { where(staged: false) }
|
||||
scope :activated_not_suspended_not_staged, -> { self.activated.not_suspended.not_staged }
|
||||
|
||||
scope :filter_by_username, ->(filter) do
|
||||
if filter.is_a?(Array)
|
||||
|
|
Loading…
Reference in New Issue
Block a user