[#1563] Clarify constant’s role

This commit is contained in:
Frederic Merizen 2018-04-04 09:40:55 +02:00
parent 66aca60957
commit 7bf7347b9c
6 changed files with 6 additions and 6 deletions

View file

@ -13,7 +13,7 @@ module MailTemplateConcern
module ClassMethods
def default_for_procedure(procedure)
body = ActionController::Base.new.render_to_string(template: const_get(:TEMPLATE_NAME))
body = ActionController::Base.new.render_to_string(template: const_get(:DEFAULT_TEMPLATE_NAME))
new(subject: const_get(:DEFAULT_SUBJECT), body: body, procedure: procedure)
end
end

View file

@ -5,7 +5,7 @@ module Mails
belongs_to :procedure
SLUG = "closed_mail"
TEMPLATE_NAME = "mails/closed_mail"
DEFAULT_TEMPLATE_NAME = "mails/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'

View file

@ -5,7 +5,7 @@ module Mails
belongs_to :procedure
SLUG = "initiated_mail"
TEMPLATE_NAME = "mails/initiated_mail"
DEFAULT_TEMPLATE_NAME = "mails/initiated_mail"
DISPLAYED_NAME = 'Accusé de réception'
DEFAULT_SUBJECT = 'Votre dossier demarches-simplifiees.fr nº --numéro du dossier-- a bien été reçu'
DOSSIER_STATE = 'en_construction'

View file

@ -5,7 +5,7 @@ module Mails
belongs_to :procedure
SLUG = "received_mail"
TEMPLATE_NAME = "mails/received_mail"
DEFAULT_TEMPLATE_NAME = "mails/received_mail"
DISPLAYED_NAME = 'Accusé de passage en instruction'
DEFAULT_SUBJECT = 'Votre dossier demarches-simplifiees.fr nº --numéro du dossier-- va être instruit'
DOSSIER_STATE = 'en_instruction'

View file

@ -5,7 +5,7 @@ module Mails
belongs_to :procedure
SLUG = "refused_mail"
TEMPLATE_NAME = "mails/refused_mail"
DEFAULT_TEMPLATE_NAME = "mails/refused_mail"
DISPLAYED_NAME = 'Accusé de rejet du dossier'
DEFAULT_SUBJECT = 'Votre dossier demarches-simplifiees.fr nº --numéro du dossier-- a été refusé'
DOSSIER_STATE = 'refuse'

View file

@ -5,7 +5,7 @@ module Mails
belongs_to :procedure
SLUG = "without_continuation"
TEMPLATE_NAME = "mails/without_continuation_mail"
DEFAULT_TEMPLATE_NAME = "mails/without_continuation_mail"
DISPLAYED_NAME = 'Accusé de classement sans suite'
DEFAULT_SUBJECT = 'Votre dossier demarches-simplifiees.fr nº --numéro du dossier-- a été classé sans suite'
DOSSIER_STATE = 'sans_suite'