save.ejs
411 Bytes
project.save().on('success', function() {
// my nice callback stuff
})
task.save().on('failure', function() {
// mhhh, wth!
})
// you can also build, save and access the object with chaining:
Task.build({ title: 'foo', description: 'bar', deadline: new Date()})
.save().on('success', function(anotherTask) {
// you can now access the currently saved task with the variable <i>anotherTask</i>... nice!
})