-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LocalStorage and 0.9.10 Collection update #73
Comments
I'll need more information. The new collection smart update? Point me to lines of code, a diff or at least a change log entry. All tests pass using 0.9.10, so this must be a new feature I'm not aware of. Please explain it :) |
Sure. http://backbonejs.org/#Collection-update. It could be possible that I'm completely misunderstanding the functionality. |
I do not have access to commit to the repository, but the latest version of Backbone requires the following changes: if (options && options.success)
- if (Backbone.VERSION === "0.9.10") {
- options.success(model, resp, options);
- } else {
- options.success(resp);
- }
+ options.success(resp); |
@Krivega Yes, but some people could still be using 0.9.10... going to leave that for a little while. |
Yes, but if use https://github.com/documentcloud/backbone/blob/master/backbone.js (general change in commit jashkenas/backbone@e4c046c ) |
it would be good for this purpose set a new version of Backbone(0.9.11) |
@Krivega we don't follow master, we follow the stable releases. |
With the official reason of 1.0 will there be any plans to support http://backbonejs.org/#Collection-set to sync LocalStorage? |
@dlcerva Does it require anything different in the |
Would you mind writing a test for this? I will, but it might take some time before I get around doing it. Once I have a failing test, the fix should be easy. |
@jeromegn any progress on this? |
@jeromegn weighing in that I too am interested in this. Thanks! In the meantime, I have extended my local storage collection with a save method. My use case is simplified since all of the models are updated and never deleted from the collection. Backbone.Collection.extend({
// localStorage, model, etc
save: function() {
this.each( function(model) {
Backbone.localSync("update", model)
})
}
}) I just call it manually after |
you really need tests? |
At the moment it doesn't appear that the LocalStorage extension does anything with the new collection smart update to save back to localStorage. Is there plans to support it or am I missing something?
The text was updated successfully, but these errors were encountered: