Trying to convert *.html.slim views to *.html.erb. I've looked at these two questions:
How can I convert html.slim to html.erb? - getting uninitialized constant
when called from the console
How can I convert html.slim files to html or html.erb? - parser hits a NoMethodError: undefined method image_tag for nil:NilClass
when it comes across the first = image_tag
. I am not using any variables inside my call, the image tag points to and svg
I think the latter solution would work best, if the good people of Stack Overflow can help me figure out the image_tag
issue.
page data-id="foo-page"
.container
= image_tag 'bar.svg'
The solution to avoid the unexpected code from Temple is to add: -o disable_escape=true
for a total of:
slimrb --rails -e -o disable_escape=true foo.html.slim > foo.html.erb
This will work :-)