Reputation: 18771
I have two templates
test.html.haml test.html.erb
both have the same content
<%= 1+1 %>
output for haml (wrong)
%= 1+1 %>
output for erb (correct
2
how do I get the haml file to allow ruby output
Upvotes: 0
Views: 84
Reputation: 118261
Look here How to Convert
ERB
<strong><%= item.title %></strong>
Haml
%strong= item.title
Upvotes: 0
Reputation: 138012
If you want a HAML file instead of a eRB file, you need to use HAML syntax instead of eRB syntax:
= 1 + 1
Upvotes: 1
Reputation: 17528
If I understand correctly, you have a haml file with the following content:
<%= 1+1 %>
That is ERB syntax, you need to use HAML syntax.
= 1 + 1
Upvotes: 1