lib/assets/javascripts/backbone_extensions/associations.js in backbone_extensions-0.0.11 vs lib/assets/javascripts/backbone_extensions/associations.js in backbone_extensions-0.0.12

- old
+ new

@@ -68,13 +68,13 @@ } if (options.parse) { var associations = { hasMany: function(assocResponse, association, newOptions) { - association.add(assocResponse, newOptions); + association.add(_(assocResponse).map(function(response) { return association.parse(response); }), newOptions); }, hasOne: function(assocResponse, association, newOptions) { - association.clear({silent: true}).set(assocResponse, newOptions); + association.clear({silent: true}).set(association.parse(assocResponse), newOptions); } }; if (associations[associationType]) { var parseFunc = _(options.parse).isFunction() &&