afeld/backbone-nested — pull request #22 by michaelcox (2012-05-15 17:58:06+00:00)
Title: Added 'add' event queue to ensure the model is updated first

In order to fix #20, I created a queue that 'add' event triggers are sent to. After the model has been updated by the parent Backbone.Model.set, it fires the triggers in the queue.

Three main elements added:
* Added test for this functionality to nested-model.js
* Added test for the related functionality of the 'remove' event being fired at the correct time (no code changes necessary, this worked as expected)
* Changes to the main backbone-nested.js file to create a new _delayedTriggers queue, push 'add' triggers into it, and fire them upon completion of the parent 'set' function.