Skip to content

Instantly share code, notes, and snippets.

@okonet
Last active December 19, 2015 18:49
Show Gist options
  • Save okonet/6001677 to your computer and use it in GitHub Desktop.
Save okonet/6001677 to your computer and use it in GitHub Desktop.
Backbone.Model.destroy method workaround for jQuery 1.9+
model.destroy({
wait: true,
dataType: 'text', // Set this to `text`
success: function() {
// will be called even if server returns empty string,
// which is normal behavior for DELETE requests
// See #2218 (https://github.com/jashkenas/backbone/issues/2218) for details
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment