update dossier after saving commentaire

update last_commentaire_updated_at without hook

Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
This commit is contained in:
clemkeirua 2020-07-22 16:34:33 +02:00 committed by Christophe Robillard
parent 667b7d9876
commit f3a675c3bc
6 changed files with 18 additions and 0 deletions

View file

@ -60,6 +60,7 @@ module Instructeurs
@commentaire = CommentaireService.build(current_instructeur, avis.dossier, commentaire_params)
if @commentaire.save
@commentaire.dossier.update!(last_commentaire_updated_at: Time.zone.now)
flash.notice = "Message envoyé"
redirect_to messagerie_instructeur_avis_path(avis.procedure, avis)
else