dhruvaray/backbone-associations — pull request #43 by singingwolfboy (2013-06-14 15:58:15+00:00)
Title: Backbone.Association.deepAttributes

It's sometimes helpful to be able to retrieve the attributes of a model and it's related models as a simple Javascript object. This utility function does that. Note that this is different from the `toJSON` function: that can (and should) be customized, while `Backbone.Association.deepAttributes` specifically targets `model.attributes`, which should be read-only and not customizable. **NOTE**: this probably blows up on cyclic graphs, but it's good enough for my purposes.

I also included a short unit test for the VERSION attribute, since that lives on the same object, and was missing a test.