Link user and administrateur
This commit is contained in:
parent
8082751912
commit
81f44fa76b
4 changed files with 13 additions and 1 deletions
|
@ -12,6 +12,8 @@ class Administrateur < ApplicationRecord
|
|||
has_many :services
|
||||
has_many :dossiers, -> { state_not_brouillon }, through: :procedures
|
||||
|
||||
has_one :user
|
||||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
scope :inactive, -> { where(active: false) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue