You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varPost=model('Post').attr('id').attr('title').attr('slug').attr('content').attr('author');varpost=newPost({title: "My new post",content: "My awesome post content"});post.save(function(err,res){post.slug()// undefinedres.body.slug// "my-new-post"post.author()// undefinedres.body.author// "Cristian Douce"});
It would be nice to have this kind of sync between model instance and server response object. Now I have to manually set an onsave callback and update model manually with the con of having my model dirty after that. Not nice :(
Activity
yocontra commentedon Feb 6, 2014
👍