[backend,refactor][xs]: move Backbone.sync override into recline.Model from recline.Backend.base.

This commit is contained in:
Rufus Pollock
2012-05-25 09:01:03 +01:00
parent fc22e86509
commit 9518d2483d
2 changed files with 5 additions and 10 deletions

View File

@@ -493,10 +493,12 @@ my.ObjectState = Backbone.Model.extend({
});
// ## Backend registry
// ## Backbone.sync
//
// Backends will register themselves by id into this registry
my.backends = {};
// Override Backbone.sync to hand off to sync function in relevant backend
Backbone.sync = function(method, model, options) {
return model.backend.sync(method, model, options);
};
}(jQuery, this.recline.Model));