I was trying to use underscore.js templates for templating in a rails 2.3 app which does not have jammit as an asset packager.
Here is the simple Templa
If you don't want to change the template settings across your entire project...
Escape the ERB tags: <%=
becomes <%%=
Note that the closing tag is still %>
, not %%>
.
Side note - I also tried outputting using a heredoc. The following code runs successfully but outputs a bunch of erb source code that gets caught between the heredoc
commands.