Sha256: e26af54805e1c851a96a24796006f17d5dd8d9a26cc0251065916613320ff73f
Contents?: true
Size: 438 Bytes
Versions: 35
Compression:
Stored size: 438 Bytes
Contents
_.each(["Model", "Collection"], function(name) { // Cache Backbone constructor. var ctor = Backbone[name]; // Cache original fetch. var fetch = ctor.prototype.fetch; // Override the fetch method to emit a fetch event. ctor.prototype.fetch = function() { // Trigger the fetch event on the instance. this.trigger("fetch", this); // Pass through to original fetch. return fetch.apply(this, arguments); }; });
Version data entries
35 entries across 35 versions & 1 rubygems