afeld/backbone-nested — pull request #26 by michaelcox (2012-05-16 20:29:03+00:00)
Title: Pull Request: add() now returns the model instead of undefined.

This wasn't a big deal, but an annoying inconsistency with an easy fix. The core Backbone `set()` function returns the model (or `false` if there is validation but it fails). However, the `add()` function for Backbone.NestedModel was returning `undefined` because it was missing an explicit return statement.

Added a test and the fix. Also added a test in to confirm that the `remove()` function returns the model, which it did already without any changes by me.