I have the following html.erb code that I’m looking to move to Haml:
<span class="<%= item.dashboardstatus.cssclass %>" >
<%= item.dashboardstatus.status %>
</span>
What does it associate the CSS class of the currently assigned status to the span?
How is this done in Haml? I’m sure I’m missing something really simple.
Edit: Gah. I can’t believe I didn’t figure that out on my own. Just goes to show that two sets of eyes are better than one.
Here is an equivalent code in HAML:
There are two tools available for conversion of HTML to HAML:
1)
html2hamltool for terminal application2) Online tool: http://html2haml.heroku.com/