Skip to content

Instantly share code, notes, and snippets.

@tgriesser
Created December 7, 2012 15:48
Show Gist options
  • Save tgriesser/4234092 to your computer and use it in GitHub Desktop.
Save tgriesser/4234092 to your computer and use it in GitHub Desktop.
var BaseModel = Backbone.Model.extend({
destroy: function () {
if (!this.beforeDestroy || this.beforeDestroy() !== false) {
Backbone.Model.prototype.destroy.apply(this, arguments);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment