aq1018/mongoid-history — pull request #33 by tcopple (2012-04-27 17:50:35+00:00)
Title: Updating Trackable::association_hash to write relationship name.

Currently there are cases (on destroy mainly) where an embedded document
writes it's class name to the association_hash name field, when it
fails to lookup the relationship meta information pertaining to it's
parent.

If you were to then call 'trackable_parent', or other methods that wall
up the association chain, the method would error because it would try to
traverse a relationship titled "Comment" instead of the correct value
"comments".

This fix makes it so a child document never fails to lookup the name of
the relationship that it's parent uses to refer to it. Thus class names
never get used in the association_chain name hash.