demarches-normaliennes/app/models/mails/closed_mail.rb

22 lines
627 B
Ruby
Raw Normal View History

2017-03-06 22:37:37 +01:00
module Mails
class ClosedMail < ApplicationRecord
2017-03-06 22:37:37 +01:00
include MailTemplateConcern
belongs_to :procedure
SLUG = "closed_mail"
DISPLAYED_NAME = "Accusé d'acceptation"
2018-02-28 16:01:20 +01:00
DEFAULT_SUBJECT = 'Votre dossier demarches-simplifiees.fr nº --numéro du dossier-- a été accepté'
DOSSIER_STATE = 'accepte'
def self.default_template_name_for_procedure(procedure)
attestation_template = procedure.attestation_template
if attestation_template.present? && attestation_template.activated?
"mails/closed_mail_with_attestation"
else
"mails/closed_mail"
end
end
2017-03-06 22:37:37 +01:00
end
end