Created
December 1, 2010 16:32
-
-
Save eyeseast/723741 to your computer and use it in GitHub Desktop.
Overriding sync to make this a read-only jsonp app
This file contains hidden or 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
// Overriding sync to make this a read-only jsonp app | |
Backbone.sync = function(method, model, success, error) { | |
$.ajax({ | |
url: getUrl(model), | |
type: 'GET', | |
// jsonp is read-only | |
//contentType: 'application/json', | |
data: null, | |
// nothing to send | |
dataType: 'jsonp', | |
processData: false, | |
success: success, | |
error: error | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment