This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
This commit is contained in:
Jeff Atwood
2020-05-22 20:25:56 -07:00
parent e62a85cf6f
commit 20780a1eee
236 changed files with 717 additions and 1033 deletions
+6 -2
View File
@@ -25,8 +25,12 @@ module EmailHelper
raw "<a href='#{Discourse.base_url}#{url}' style='color: ##{@anchor_color}'>#{title}</a>"
end
def email_html_template
EmailStyle.new.html.sub('%{email_content}', yield).html_safe
def email_html_template(binding_arg)
template = EmailStyle.new.html.sub(
'%{email_content}',
'<%= yield %><% if defined?(html_body) %><%= html_body %><% end %>'
)
ERB.new(template).result(binding_arg)
end
protected