Skip to content

Instantly share code, notes, and snippets.

@aheckmann
Created June 20, 2012 20:05
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/2961883 to your computer and use it in GitHub Desktop.
Save aheckmann/2961883 to your computer and use it in GitHub Desktop.
v3-p1-fix-comment
Post.findById(postId, function (err, post) {
// handle errors ..
var comment = post.comments.id(commentId);
comment.body = updatedText;
post.save(callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment