[#1563] Allow default template name to depend on procedure
This commit is contained in:
parent
7bf7347b9c
commit
db0937d1eb
1 changed files with 6 additions and 1 deletions
|
@ -13,9 +13,14 @@ module MailTemplateConcern
|
|||
|
||||
module ClassMethods
|
||||
def default_for_procedure(procedure)
|
||||
body = ActionController::Base.new.render_to_string(template: const_get(:DEFAULT_TEMPLATE_NAME))
|
||||
template_name = default_template_name_for_procedure(procedure)
|
||||
body = ActionController::Base.new.render_to_string(template: template_name)
|
||||
new(subject: const_get(:DEFAULT_SUBJECT), body: body, procedure: procedure)
|
||||
end
|
||||
|
||||
def default_template_name_for_procedure(procedure)
|
||||
const_get(:DEFAULT_TEMPLATE_NAME)
|
||||
end
|
||||
end
|
||||
|
||||
def dossier_tags
|
||||
|
|
Loading…
Reference in a new issue