User: inactive user have never signed_in
This commit is contained in:
parent
b1bc7a2642
commit
0c15326df6
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ class Administrateur < ApplicationRecord
|
|||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
scope :inactive, -> { where(active: false) }
|
||||
scope :inactive, -> { joins(:user).where(users: { last_sign_in_at: nil }) }
|
||||
scope :with_publiees_ou_archivees, -> { joins(:procedures).where(procedures: { aasm_state: [:publiee, :archivee] }) }
|
||||
|
||||
# validate :password_complexity, if: Proc.new { |a| Devise.password_length.include?(a.password.try(:size)) }
|
||||
|
|
Loading…
Reference in a new issue