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 ele
You can try using html_safe which is a method on String objects. This will escape the html characters in the variable statement (< for example) and will leave the intact for underscore to evaluate at runtime:
%input{:type => 'checkbox', :name => "documents[]", :value => "<%= document.attributes.id %>".html_safe}
(Tested on rails 3.0.13)