不要怂,就是干,撸起袖子干!

save.ejs 416 Bytes
project.save().on('success', function() {
  // my nice callback stuff
})

task.save().on('failure', function(error) {
  // 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!
})