[fix #1855] Gestionnaire: are now invited to create their password

This commit is contained in:
simon lehericey 2018-04-27 12:29:01 +02:00
parent b1fd9b4d52
commit bb4d29ee8f
9 changed files with 101 additions and 24 deletions

View file

@ -144,6 +144,12 @@ class Gestionnaire < ApplicationRecord
Follow.where(gestionnaire: self, dossier: dossier).update_all(attributes)
end
def invite!
reset_password_token = set_reset_password_token
GestionnaireMailer.invite_gestionnaire(self, reset_password_token).deliver_now!
end
private
def valid_couple_table_attr?(table, column)