[#1972] Avoid passing unsaved templates to ActionMailer
So that all mail arguments can be serialized
This commit is contained in:
parent
1fb85afdc7
commit
cce00e19c6
9 changed files with 68 additions and 36 deletions
|
@ -55,7 +55,7 @@ class Users::DescriptionController < UsersController
|
|||
if dossier.brouillon?
|
||||
dossier.en_construction!
|
||||
# TODO move to model
|
||||
NotificationMailer.send_notification(dossier, procedure.initiated_mail_template).deliver_now!
|
||||
NotificationMailer.send_initiated_notification(dossier).deliver_now!
|
||||
end
|
||||
flash.notice = 'Félicitations, votre demande a bien été enregistrée.'
|
||||
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: dossier.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue