Support for HAML templates
sethvargo opened this issue · comments
When passing a HAML template as a mailer, Roadie does not inlay styles correctly. For some reason, it adds a second equals sign =
and then that sign is URL encoded at some point. As a result, styles appear like this:
<div style=3D"(styles)">
The styles are then (obviously) not rendered as this is not valid HTML.
Please provide more information. I have never used anything other than HAML for my templates, so the problem is most likely somewhere else. Also, which version of Rails are you using, and are you using the prerelease gem or the current stable version.
This could be a bug in Nokogiri, actually, since I'm just manipulating an HTML tree, not raw strings.
It occurs when using HAML layout templates, using yield
for content rendering.
I'm using Rails 3.1, current (not pre) gem.
Sure, but I need a small reproducible test case to work with. This does not happen for me.
It would be best if you could drill it down to the basics, just a template, a view and a stylesheet that shows this problem and nothing else.
Also show me your Gemfile.lock so I can investigate if there's some conflict with another gem. Are you on Darwin, Linux or Windows, btw?
Until I get something to replicate, I'm going to close this issue.
Hi Mange, I have exactly same issue. You can use this gist to reproduce it. Appreciate your comments. Thanks!
Thanks for the data. I will reopen this and investigate when I get the time.
For now, my guess are the @media
styles. Try to make those styles immutable since they are useless with roadie anyway and will be (at best) removed.
First of all, thanks a lot for the quick response. I tried removing all @media
styles. It turns out this is a mailer issue instead. I removed
from the gist template and Roadie works as expected. You can close this ticket.
Glad it worked better for you :-)