NotificationMailer : dossier_validated
This commit is contained in:
parent
25937b2635
commit
372011e4d6
4 changed files with 41 additions and 7 deletions
|
@ -1,10 +1,23 @@
|
|||
class NotificationMailer < ApplicationMailer
|
||||
def new_answer dossier
|
||||
@user = dossier.user
|
||||
@dossier = dossier
|
||||
# @url = users_dossier_url id: dossier.id
|
||||
send_mail dossier, "Nouveau commentaire pour votre dossier TPS N°#{dossier.id}"
|
||||
end
|
||||
|
||||
mail(from: "tps@apientreprise.fr", to: dossier.user.email,
|
||||
subject: "Nouveau commentaire pour votre dossier TPS N°#{dossier.id}")
|
||||
def dossier_validated dossier
|
||||
send_mail dossier, "Votre dossier TPS N°#{dossier.id} a été validé"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def vars_mailer dossier
|
||||
@dossier = dossier
|
||||
@user = dossier.user
|
||||
end
|
||||
|
||||
def send_mail dossier, subject
|
||||
vars_mailer dossier
|
||||
|
||||
mail(from: "tps@apientreprise.fr", to: @user.email,
|
||||
subject: subject)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue