Skip to content

Instantly share code, notes, and snippets.

@cmaher
Created January 16, 2015 22:53
Show Gist options
  • Save cmaher/d64b8e67f0d3e4e69d55 to your computer and use it in GitHub Desktop.
Save cmaher/d64b8e67f0d3e4e69d55 to your computer and use it in GitHub Desktop.
Using Hoard with a Model
var cacheControl = new Backbone.Hoard.Control();
var MyModel = Backbone.Model.extend({
url: function () {
return '/my-models/' + this.id;
},
sync: cacheControl.getModelSync()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment