1
0

Fix subject rendering logic

This commit is contained in:
Tim Kächele 2020-12-11 11:19:13 +01:00
parent bd6f539efe
commit 7bd547141b

View File

@ -61,8 +61,11 @@ class CreateEmail
end
def render_subject(template_version, personalization)
handlebars_renderer.render(template_version['subject'],
{ 'subject' => personalization['subject'] })
subject_template = personalization['subject']
subject_template = template_version['subject'] if subject_template.blank?
handlebars_renderer.render(subject_template,
personalization['dynamic_template_data'])
end
def render_html(template_version, personalization)