lib/roadie/rails/mail_inliner.rb in roadie-rails-2.3.0 vs lib/roadie/rails/mail_inliner.rb in roadie-rails-3.0.0
- old
+ new
@@ -10,16 +10,17 @@
@options = options
end
def execute
if options
- improve_body if email.content_type =~ %r{^text/html}
+ improve_body if %r{^text/html}.match?(email.content_type)
improve_html_part(email.html_part) if email.html_part
end
email
end
private
+
def improve_body
email.body = transform_html(email.body.decoded)
end
def improve_html_part(html_part)