-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:
Related to this: https://github.com/mongoid/mongoid/issues/1063
In 2.4 in a before_destroy callback on an embedded doc, I could return false if I didn't want the destroy to proceed. This was called on nested attribute updates using a _destroy=1. This is useful if for example you don't want the last embedded doc in an embeds_many to be deletable.
In 2.4.9 returning false does not prevent the delete.
I've tried Paranoia as well, but callbacks are not called at all, on updates with _destroy=1