FIX: Email Styles were evaluated out of order

`yield` puts the content in the template right away unless explicitly
`capture`'d.
This commit is contained in:
Robin Ward
2020-05-25 12:46:44 -04:00
parent e8fb9d4066
commit fd2d7ca992
2 changed files with 3 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module EmailHelper
end
def email_html_template
EmailStyle.new.html.sub('%{email_content}', yield).html_safe
EmailStyle.new.html.sub('%{email_content}', capture { yield }).html_safe
end
protected