NotificationMailer: simplify using default method
This commit is contained in:
parent
47fc6e6957
commit
2f5dde381a
1 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
||||||
class NotificationMailer < ApplicationMailer
|
class NotificationMailer < ApplicationMailer
|
||||||
|
default from: 'tps@apientreprise.fr',
|
||||||
|
to: Proc.new { @user.email }
|
||||||
|
|
||||||
def new_answer dossier
|
def new_answer dossier
|
||||||
send_mail dossier, "Nouveau message pour votre dossier TPS N°#{dossier.id}"
|
send_mail dossier, "Nouveau message pour votre dossier TPS N°#{dossier.id}"
|
||||||
end
|
end
|
||||||
|
@ -33,7 +36,6 @@ class NotificationMailer < ApplicationMailer
|
||||||
def send_mail dossier, subject
|
def send_mail dossier, subject
|
||||||
vars_mailer dossier
|
vars_mailer dossier
|
||||||
|
|
||||||
mail(from: "tps@apientreprise.fr", to: @user.email,
|
mail(subject: subject)
|
||||||
subject: subject)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue