Last active
December 19, 2015 18:49
-
-
Save okonet/6001677 to your computer and use it in GitHub Desktop.
Backbone.Model.destroy method workaround for jQuery 1.9+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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