Err ... my bad. Implement refreshFromServer from my answer to your earlier question. , and this is completely, uselessly wrong.
Backbone.sync expects arguments (method, model, options) , but in its current form it does not get what it needs from refreshFromServer , because the update method simply sends all the arguments it receives. I'm sorry for the mistake.
Correct, working implementation:
refreshFromServer : function(options) { return Backbone.ajaxSync('read', this, options); }
It can be used either through success / error callbacks passed to the options hash:
this.collection.refreshFromServer({ success: function() { });
Or through the jqXHR promises API:
this.collection.refreshFromServer().done(function() { })
Or do not register for callbacks and wait for the reset collection event, as in your example:
this.collection.bind("reset", this.render, this); this.collection.refreshFromServer();
That should work. Please let me know if this is not the case. I also corrected my answer in the previous question if someone came across it.
Edit: To save data in local storage after the update, you will need to manually save each of the models:
var collection = this.collection; collection.refreshFromServer({success: function(freshData) { collection.reset(freshData); collection.each(function(model) { model.save(); }); }});