Skip to content

Instantly share code, notes, and snippets.

@cfurrow
Created November 14, 2010 23:51
Show Gist options
  • Save cfurrow/676238 to your computer and use it in GitHub Desktop.
Save cfurrow/676238 to your computer and use it in GitHub Desktop.
// ...
var templates = require('./haml_loader');
// ...
app.get('/item/edit/:id',function(req,res){
var item_edit = templates['item_edit'];
Item.findById(req.params.id,function(data){
res.render('edit',{locals:{name:data.name,description:data,haml_func:item_edit}});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment