+13

ruby embedded code in HTML doesn't work properly

brenes 14 years ago 0
Ruby code embedded on erb templates is not rendered properly.

It seems as it doesn't detect the end of the ruby code (the %> token).

As an example, on <li<%= ' class="open"' if must_open %> id="menu_item_1">, "id='menu_item_1'>" is not rendered as HTML.

If I remove the second '%' and write <li<%= ' class="open"' if must_open > id="menu_item_1">, then "id='menu_item_1'>" is rendered as proper HTML.

I think it may have some issue with the '%' symbol?