I’m trying to follow this Rails/Backbone example but they are using erb and not haml. See lines 45-48 of
https://github.com/AndrewGertig/backbone-demo/blob/master/app/views/dogs/index.html.erb
It doesn’t seem to be possible to add an :id attribute to script so it looks like…
<script id="dog_template" type="text/html">
<td>{{name}}</td>
<td>{{age}}</td>
</script>
You can try it out here