Merge pull request #379 from mjuniper/master

Don't override backbone.sync globally; only inside recline.Dataset.
This commit is contained in:
Rufus Pollock
2013-12-12 04:31:47 -08:00

View File

@@ -52,6 +52,10 @@ my.Dataset = Backbone.Model.extend({
} }
}, },
sync: function(method, model, options) {
return this.backend.sync(method, model, options);
},
// ### fetch // ### fetch
// //
// Retrieve dataset and (some) records from the backend. // Retrieve dataset and (some) records from the backend.
@@ -635,9 +639,9 @@ my.ObjectState = Backbone.Model.extend({
// ## Backbone.sync // ## Backbone.sync
// //
// Override Backbone.sync to hand off to sync function in relevant backend // Override Backbone.sync to hand off to sync function in relevant backend
Backbone.sync = function(method, model, options) { // Backbone.sync = function(method, model, options) {
return model.backend.sync(method, model, options); // return model.backend.sync(method, model, options);
}; // };
}(this.recline.Model)); }(this.recline.Model));