Notifie tous les instructeurs lors dépôt dossier
- envoie un mail à tous les instructeurs d'une procédure après le dépôt d'un nouveau dossier
This commit is contained in:
parent
f618ab5ba2
commit
ae18ff6627
6 changed files with 41 additions and 0 deletions
|
@ -153,6 +153,9 @@ module Users
|
|||
if passage_en_construction? && errors.blank?
|
||||
@dossier.en_construction!
|
||||
NotificationMailer.send_initiated_notification(@dossier).deliver_later
|
||||
@dossier.procedure.instructeurs.each do |instructeur|
|
||||
DossierMailer.notify_new_dossier_depose_to_instructeur(@dossier, instructeur.email).deliver_later
|
||||
end
|
||||
return redirect_to(merci_dossier_path(@dossier))
|
||||
elsif errors.present?
|
||||
flash.now.alert = errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue