Instantly share code, notes, and snippets.

What would you like to do?
HAML example with pakunok gem
// app/assets/javascripts/application.js
// Include the template into the app
//= require_tree backbone/templates
// And here's how you do the templating
var html = JST.comment(commentModel.attributes);
// Or as one liner:
$(".comments").append( JST.comment(commentModel.attributes) );
-# app/assets/javascripts/backbone/templates/comment.js.hamljs
.author= author
.text= text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment