I am using the rails-backbone gem ( https://github.com/codebrew/backbone-rails). For rendering HTML, it uses some kind of javascript templates, whose name I cannot tell even aft
A very good reference to what all this is about is here:-
http://www.bigjason.com/blog/precompiled-javascript-templates-rails-3-1
Rails processes EJS templates with ejs gem which is a port of underscore.js's _.template function to Ruby. Output of that is a javascript function which in turn will produce the html when run in the browser.
Here's recent article which includes also description of backbone-rails: