clean(CommentaireService): extract soft delete within controller. returning an instance with an error[:base] is not persisted with validation : avoid poluting stuff

This commit is contained in:
Martin 2021-11-16 16:10:08 +01:00
parent 8bbd77f89f
commit f0950b592b
8 changed files with 33 additions and 117 deletions

View file

@ -22,7 +22,8 @@ class DossierMailer < ApplicationMailer
end
def notify_new_answer
dossier = params[:commentaire].dossier
commentaire = params[:commentaire]
dossier = commentaire.dossier
I18n.with_locale(dossier.user_locale) do
@dossier = dossier
@service = dossier.procedure.service