aq1018/mongoid-history — pull request #32 by tcopple (2012-04-04 18:13:13+00:00)
Title: Fixing Trackable::association_hash nil meta value call.

Bug was exposed while trying to use 'accepts_nested_attributes_for' with
a child's _destroy flag set to true, and cascading callbacks turned on.

* If cascading_callbacks is not set then the call to
'parent.update_attributes()' does not fire the child.destroy call.

* If accepts_nested_attributes_for is not set, then the call
'parent.update_attributes()' does not attempt to write any nested child
data.

* Finally, if we are not destroying the child, then things work fine.
There are only issues if we issue the _destroy flag because the child's
parent association is removed before mongoid-history has the
opportunity to write a new history track to logging the destroy.