Link user and administrateur

This commit is contained in:
simon lehericey 2019-08-09 09:45:11 +02:00
parent 8082751912
commit 81f44fa76b
4 changed files with 13 additions and 1 deletions

View file

@ -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) }