Skip to content

Instantly share code, notes, and snippets.

@jherdman
Created February 7, 2014 15:08
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 jherdman/8864469 to your computer and use it in GitHub Desktop.
Save jherdman/8864469 to your computer and use it in GitHub Desktop.
// In some route...
actions: {
deleteModel: function (model) {
model.deleteRecord();
model.save().then(
function () {
console.log("I succeeded... but this isn't the point of this gist...");
},
function () {
// Right here my model isDirty=true, isDeleted=true
model.rollback(); // doesn't reset isDirty of isDeleted
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment