Rails + Haml: how to parameter unescape tag?
I am trying to execute the following content in the source code:
<div id="box<%=id%>"></div>
Without any sign in Haml.
%div{ :id => "box_<%=id%>" }
produces
<div id='box_<%=id%>'></div>
Currently, the only way I can do this with Haml is to use a filter :plainand hardcode HTML without using any viewing helpers. How can i fix this?
I need this because I am forced to follow this convention due to a third-party syntax convention: JavaScript JavaScript Templates
Link:
, HAML . , , - HAML :
%script#template(type="text/html")
%div{ :id => "box_<%=id%>" }
:
%script#template(type="text/html")
<div id="box_<%=id%>"></div>
script HAML, , %, # .., , , , , . , , jQote ( , Javascript templating) % $ Javascript head :
%script( type="text/javascript")
$(function() { $.jqotetag( '$' ); });
, % Ruby. , :
%script#template(type="text/html")
<div id="box_<$=id$>"></div>
!