From 590566927066129117b2f6d93c419ba4f6ac765e Mon Sep 17 00:00:00 2001 From: Wojciech Zawistowski Date: Fri, 27 Sep 2013 19:46:26 +0200 Subject: [PATCH] removes unused builders param from Discourse.Model.mergeAttributes --- .../javascripts/discourse/models/model.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/discourse/models/model.js b/app/assets/javascripts/discourse/models/model.js index 31f1f289850..44470e23dbb 100644 --- a/app/assets/javascripts/discourse/models/model.js +++ b/app/assets/javascripts/discourse/models/model.js @@ -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); }); }