I have my own sync method in my backbone.js application. All my models call this method, but since I override success in this method, my success methods from individual models are no longer called. Here is what I mean - Below is my own synchronization method:
app.customSync = function(method, model, options) { var success = options.success, error = options.error, customSuccess = function(resp, status, xhr) {
Here is an example that I am trying to call successful with saving the model:
this.model.save({ success:function(model, response){ if(con)console.log('this is never called'); } });
Does anyone know how I can still set up synchronization with custom success methods and achieve success from my individual savings?
As a note, I tried calling success msuccess in model.save , but msuccess was undefined in user synchronization.
coder source share