andyfowler/Backbone.dualStorage — pull request #1 by nilbus (2012-07-29 02:49:58+00:00)
Title: Fix ignoreCallback bug

I'm not using this branch any more, but this fix should probably be useful to you.

localsync was running callbacks when it was not intended.
In ff828fc88, backbone.dualstorage.coffee:228 added: options.ignoreCallbacks = false
Changing the options object also affects the other callbacks that use options (such as line 202: localsync('clear', model, options))
since multiple callbacks are defined in the same scope using the same options variable.
In my case, the localsync('clear', ...) was called with ignoreCallbacks = false.
Since clear doesn't return a response, the error callback would get called once for each collection item
every time I would fetch on the collection.