Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bsync = Backbone.sync;
- Backbone.sync = function(method, model, success, error) {
- console.log('Syncing: '+method);
- if(method === 'update') {
- var changed = model.changedAttributes();
- console.log(changed);
- var sync_model = new Criteria(changed);
- bsync(method, sync_model, success, error);
- } else {
- bsync(method, model, success, error);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement