X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ac081305f24453b576d826f0b85a851e0e8506e2..5a6c0eb49e5e24d9048472c75e2f82f567729050:/app/helpers/notifier_helper.rb?ds=sidebyside diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb index 62801ed82..23ee45648 100644 --- a/app/helpers/notifier_helper.rb +++ b/app/helpers/notifier_helper.rb @@ -11,4 +11,18 @@ module NotifierHelper :style => "text-decoration: none; color: #222; font-weight: bold" ) end + + def message_body(&block) + render( + :partial => "message_body", + :locals => { :body => capture(&block) } + ) + end + + def style_message(html) + # Because we can't use stylesheets in HTML emails, we need to inline the + # styles. Rather than copy-paste the same string of CSS into every message, + # we apply it once here, after the message has been composed. + html.gsub /
/, '
' + end end