removes unused builders param from Discourse.Model.mergeAttributes
This commit is contained in:
parent
3f3551f1e2
commit
5905669270
|
@ -14,24 +14,11 @@ Discourse.Model = Ember.Object.extend(Discourse.Presence, {
|
|||
|
||||
@method mergeAttributes
|
||||
@param {Object} attrs The attributes we want to merge with
|
||||
@param {Object} builders Optional builders to use when merging attributes
|
||||
**/
|
||||
mergeAttributes: function(attrs, builders) {
|
||||
mergeAttributes: function(attrs) {
|
||||
var _this = this;
|
||||
_.each(attrs, function(v,k) {
|
||||
// If they're in a builder we use that
|
||||
var builder, col;
|
||||
if (typeof v === 'object' && builders && (builder = builders[k])) {
|
||||
if (!_this.get(k)) {
|
||||
_this.set(k, Em.A());
|
||||
}
|
||||
col = _this.get(k);
|
||||
_.each(v,function(obj) {
|
||||
col.pushObject(builder.create(obj));
|
||||
});
|
||||
} else {
|
||||
_this.set(k, v);
|
||||
}
|
||||
_this.set(k, v);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue