Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aheckmann
Created June 27, 2012 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheckmann/3005499 to your computer and use it in GitHub Desktop.
Save aheckmann/3005499 to your computer and use it in GitHub Desktop.
v3-pt-findbyid
Cat.findById(id, function (err, cat) {
if (err) ...
cat.name = 'Sprinkles'
cat.save(function (err) {
if (err) ..
render('cat', cat);
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment