Related change: 75417f6
customization of BackboneSync behaviour for onlineSyncing.
Blanket success was incorrect. For example, when fetching and id that was never cached locally, the error callback should be used. Related: #94
…u can use UUIDs as permanent IDs.
…DirtyAndDestroyed Closes #79
Backbone.sync only sent xhr as a 3rd argument in Backbone <= 0.9.9. With Backbone >= 1.0.0, every successful request would fail while checking the status, as of 863db19 (unreleased). - Update the Backbone.sync stub to reflect the change in Backbone 1.0.0. - Update the Backbone.sync stub to return xhr as Backbone.sync does. - Manually set options.xhr, since Backbone <= 0.9.9 did not set this. - Prepend _ to _status and _xhr parameters that are not passed in Backbone >= 0.9.9. These cannot be used by dualstorage as they do not work after 0.9.9 and are just passed along for compatibility with these older versions.
This makes it clear that the xhr object is always passed, not the response body. Also add this option to the changelog.
… offline status - Rename error callback parameter to xhr, since that is really what it is - Update the mock ajax callback xhr argument to always include the http status and response
If a model with a temp id is destroyed, it should not be marked as destroyed. Because it has never been synced with the server.
When a model with a temp id is destroyed, then the success and error callbacks should be invoked too.
This bug was introduced in #94 and v1.3.1.