Is it possible to override the collection.add method globally in the spine like this:
Backbone.Collection.prototype._add = Backbone.Collection.prototype.add;
Backbone.Collection.prototype.add = function(models, options) {
var = newModels = models.items;
Backbone.Collection.prototype._add(newModels, options);
}
Api, which I use ALWAYS, contains actual models on one level for collections. In itemsand I believe that overrides the method .addfor all collections. I tried what I had above, but it didn't seem to work. Any ideas?
Thank,
Louis
source
share