Add User.unconfirmed
scope, reduce factories in scheduler/user_cleanup
spec (#31063)
This commit is contained in:
parent
34626b8291
commit
e881a59671
3 changed files with 18 additions and 15 deletions
|
@ -117,6 +117,7 @@ class User < ApplicationRecord
|
|||
scope :pending, -> { where(approved: false) }
|
||||
scope :approved, -> { where(approved: true) }
|
||||
scope :confirmed, -> { where.not(confirmed_at: nil) }
|
||||
scope :unconfirmed, -> { where(confirmed_at: nil) }
|
||||
scope :enabled, -> { where(disabled: false) }
|
||||
scope :disabled, -> { where(disabled: true) }
|
||||
scope :active, -> { confirmed.signed_in_recently.account_not_suspended }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue