I'm building an application using Backbone.js, Underscore.js, HAML, and Coffeescript.
The problem I'm having is getting variables to interpolate inside of html element attributes.
<% _.each(collection.models, function(document) { %>
%tr
%td
%input{:type => 'checkbox', :name => "documents[]", :value => "<%= document.attributes.id %>"}
%td <%= document.attributes.id %>
%td <%= document.attributes.name %>
<% } %>
<% }); %>
The object's values are displaying properly inside of the <td>, but not within the input's value attribute.
Is interpolation inside of an element's attributes possible? I was not able to find a solution.
Thanks