Related to #146
Let's say I have a model in localStorage. Its key would be something like http://ip/some/path/stuff_dirty.
When I come back online and call syncDirtyAndDestroyed, I expect all the _dirty (and _destroyed) models to be cleared from localStorage. However, this does not happen.
Perhaps this changes something, but I'm testing this from the console. I'm calling mystore.save(somemodel) and then disconnecting and reconnecting twice. Both times it tries to sync that model (2 POSTS).
I feel like there should be a window.localStorage.clear() after the syncDirtyAndDestroyed (at the end of). Of course it would have to be implemented more carefully, because if the sync fails, localstorage would still be cleared. It would need to remove only the models that were successfully synced.
Actually, I see now that syncDirty calls save which in turn calls dualsync. Something in there should be clearing localStorage.
I think this must be the same issue as #146. I'll close this in favor of that one.