demarches-normaliennes/app/models/mails/closed_mail.rb
2018-05-31 11:49:25 +02:00

21 lines
595 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.

module Mails
class ClosedMail < ApplicationRecord
include MailTemplateConcern
belongs_to :procedure
SLUG = "closed_mail"
DISPLAYED_NAME = "Accusé d'acceptation"
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&.activated?
"mails/closed_mail_with_attestation"
else
"mails/closed_mail"
end
end
end
end