You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst working through an example app I came across an issue with email templates generated by rails. Slim isn't really suitable for this because the expected behaviour of rendering plain text as is doesn't happen with slim. I'll illustrate
with an erb template with content
hello world
you get output
hello world
with a slim template with the same content you get output
<hello>world</hello>
This isn't a bug with slim, its fundamental to how slim works.
It would an improvement if slim-rails could fall back to generating an erb template for txt email views. An alternative might be to generate a template with some content like
# prefer erb over slim for txt templates
# otherwise make sure your content is contained in a slim block
|
content here inside the slim block de-lineated by |
The text was updated successfully, but these errors were encountered:
Not sure if I understand your issue @diabolo
Please see an example below where I generate a new template and get both text.slim and html.slim templates which seem legit to me:
Whilst working through an example app I came across an issue with email templates generated by rails. Slim isn't really suitable for this because the expected behaviour of rendering plain text as is doesn't happen with slim. I'll illustrate
with an erb template with content
you get output
with a slim template with the same content you get output
This isn't a bug with slim, its fundamental to how slim works.
It would an improvement if slim-rails could fall back to generating an erb template for txt email views. An alternative might be to generate a template with some content like
The text was updated successfully, but these errors were encountered: