Skip to content

Instantly share code, notes, and snippets.

@krusty
Created March 12, 2012 17:22
Show Gist options
  • Save krusty/2023477 to your computer and use it in GitHub Desktop.
Save krusty/2023477 to your computer and use it in GitHub Desktop.
fetch: function (options) {
this.trigger('fetching');
var new_options = _.clone(options) || {};
var that = this;
new_options.success = function (arguments) {
if (options && typeof options.success === "function") {
options.success.call(arguments);
}
that.trigger('done');
}
Backbone.Model.prototype.fetch.call(this, new_options);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment