Lines Matching refs:attrs

112   var modelMatcher = function(attrs) {  argument
113 var matcher = _.matches(attrs);
395 var attrs = attributes || {};
401 if (options.parse) attrs = this.parse(attrs, options) || {};
403 attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
404 this.set(attrs, options);
462 matches: function(attrs) { argument
463 return !!_.iteratee(attrs, this)(this.attributes);
473 var attrs;
475 attrs = key;
478 (attrs = {})[key] = val;
484 if (!this._validate(attrs, options)) return false;
503 for (var attr in attrs) {
504 val = attrs[attr];
515 if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
548 var attrs = {};
549 for (var key in this.attributes) attrs[key] = void 0;
550 return this.set(attrs, _.extend({}, options, {unset: true}));
614 var attrs;
616 attrs = key;
619 (attrs = {})[key] = val;
628 if (attrs && !wait) {
629 if (!this.set(attrs, options)) return false;
630 } else if (!this._validate(attrs, options)) {
643 if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
651 if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
654 if (method === 'patch' && !options.attrs) options.attrs = attrs;
730 _validate: function(attrs, options) { argument
732 attrs = _.extend({}, this.attributes, attrs);
733 var error = this.validationError = this.validate(attrs, options) || null;
879 var attrs = this._isModel(model) ? model.attributes : model;
880 if (options.parse) attrs = existing.parse(attrs, options);
881 existing.set(attrs, options);
1018 where: function(attrs, first) { argument
1019 return this[first ? 'find' : 'filter'](attrs);
1024 findWhere: function(attrs) { argument
1025 return this.where(attrs, true);
1105 modelId: function(attrs) { argument
1106 return attrs[this.model.prototype.idAttribute || 'id'];
1119 _prepareModel: function(attrs, options) { argument
1120 if (this._isModel(attrs)) {
1121 if (!attrs.collection) attrs.collection = this;
1122 return attrs;
1126 var model = new this.model(attrs, options);
1370 var attrs = _.extend({}, _.result(this, 'attributes'));
1371 if (this.id) attrs.id = _.result(this, 'id');
1372 if (this.className) attrs['class'] = _.result(this, 'className');
1374 this._setAttributes(attrs);
1426 params.data = JSON.stringify(options.attrs || model.toJSON(options));