From 80e75b33c49f595bc3eb7adcc4d88a740f07f9d4 Mon Sep 17 00:00:00 2001 From: Frederic Merizen Date: Wed, 30 May 2018 17:12:06 +0200 Subject: [PATCH] [Fix #1999] create commentaires for AR --- app/mailers/notification_mailer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 9d39aff0f..7d803b9cf 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -1,8 +1,6 @@ class NotificationMailer < ApplicationMailer default to: Proc.new { @user.email } - after_action :create_commentaire_for_notification, only: [:send_notification, :send_dossier_received] - def send_dossier_received(dossier_id) dossier = Dossier.find(dossier_id) send_notification(dossier, dossier.procedure.received_mail_template) @@ -44,6 +42,8 @@ class NotificationMailer < ApplicationMailer @subject = mail_template.subject_for_dossier dossier @body = mail_template.body_for_dossier dossier + create_commentaire_for_notification + mail(subject: @subject) { |format| format.html { @body } } end