att-cloud/daylight — pull request #46 by dmcinnes (2014-08-26 00:11:45+00:00)
Title: Add Association persistance

Now recursively generates modifications from the object's associations when serialized.

Fixes #5

* `serializable_hash` includes modified associations
* Keep track of association hashcodes to know if an association itself changed (Array modified etc)
* Associations are instantiated on first call and not on load.
* The attributes hash no longer holds instantiated associated models, loaded or set, only raw data from the server.
* Extracted `load_attributes_for` from `ActiveResource#load` so we can instantiate parts of the attributes hash on the fly.
* Updated `belongs_to` association to be consistent with the other associations by using `define_cache_method` instead of relying on ActiveResource.