-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Since there is no
:dependent => :destroy
for embedded documents I manually trigger their destruction in a before_destroy callback on the parent. In Mongoid 2.1.x it seems that the parent reference becomes nil inside the embedded documents during the destroy callbacks so if I want to do stuff related to the parent (which I do) I'm screwed.
Gist to reproduce:
https://gist.github.com/1124824