afeld/backbone-nested — pull request #29 by trevorquinn (2012-05-23 18:14:22+00:00)
Title: Fix for issue 28

Fixes issue #28 by populating a temporary chg variable for nested attributes during the recursive _mergeAttrs calls. Then, after all the attributes are merged, calls:

if (!this._validate(newAttrs, opts)) return false;

Then, if validation passes, triggers the change events and populates this.changed using the chg variable, then finally calls the super (Backbone.Model) set function, which handles non-nested attributes.

New passing unit test included as well.