demarches-normaliennes/app/mailers/dossier_mailer.rb
2018-06-19 10:05:00 +02:00

24 lines
762 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class DossierMailer < ApplicationMailer
layout 'mailers/layout'
def notify_deletion_to_user(deleted_dossier, to_email)
@deleted_dossier = deleted_dossier
subject = "Votre dossier n° #{@deleted_dossier.dossier_id} a bien été supprimé"
mail(to: to_email, subject: subject)
end
def notify_deletion_to_administration(deleted_dossier, to_email)
@deleted_dossier = deleted_dossier
subject = "Le dossier n° #{@deleted_dossier.dossier_id} a été supprimé à la demande de l'usager"
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