demarches-normaliennes/app/mailers/dossier_mailer.rb

25 lines
762 B
Ruby
Raw Normal View History

class DossierMailer < ApplicationMailer
layout 'mailers/layout'
def notify_deletion_to_user(deleted_dossier, to_email)
@deleted_dossier = deleted_dossier
2018-05-31 15:26:02 +02:00
subject = "Votre dossier n° #{@deleted_dossier.dossier_id} a bien été supprimé"
2018-05-31 23:58:10 +02:00
2018-05-31 15:26:02 +02:00
mail(to: to_email, subject: subject)
end
def notify_deletion_to_administration(deleted_dossier, to_email)
@deleted_dossier = deleted_dossier
2018-05-31 15:26:02 +02:00
subject = "Le dossier n° #{@deleted_dossier.dossier_id} a été supprimé à la demande de l'usager"
2018-05-31 23:58:10 +02:00
2018-05-31 15:26:02 +02:00
mail(to: to_email, subject: subject)
end
def notify_unhide_to_user(dossier)
@dossier = dossier
subject = "Votre dossier n° #{@dossier.id} n'a pas pu être supprimé"
mail(to: dossier.user.email, subject: subject)
end
end