[Fix #1479] Sanitize Administrateur email before validation
This commit is contained in:
parent
d9c562c59d
commit
8731f7c63b
1 changed files with 4 additions and 2 deletions
|
@ -1,14 +1,16 @@
|
|||
class Administrateur < ApplicationRecord
|
||||
include CredentialsSyncableConcern
|
||||
include EmailSanitizableConcern
|
||||
|
||||
devise :database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :trackable, :validatable
|
||||
|
||||
has_and_belongs_to_many :gestionnaires
|
||||
has_many :procedures
|
||||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
before_save :ensure_api_token
|
||||
|
||||
include CredentialsSyncableConcern
|
||||
|
||||
scope :inactive, -> { where(active: false) }
|
||||
|
||||
def self.find_inactive_by_token(reset_password_token)
|
||||
|
|
Loading…
Reference in a new issue