I have the following collection:
我有以下集合:
UsersMod.users_list = Backbone.Collection.extend({
add : function(model) {
var duplicate = this.any(function(_model) {
return _model.get('user') === model.get('user');
});
if (duplicate) {
return false;
}
Backbone.Collection.prototype.add.call(this, model);
}
});
Us