ruby-on-railserbslim-lang

Convert html.slim views to html.erb - Rails, Slim, ERB


Trying to convert *.html.slim views to *.html.erb. I've looked at these two questions:

I think the latter solution would work best, if the good people of Stack Overflow can help me figure out the image_tag issue.

My code (as requested):

page data-id="foo-page"
  .container
    = image_tag 'bar.svg'

Solution

  • 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 :-)