mongoid/mongoid — Issue #1441: Mongoid should support association callbacks
Author: iamnader
Created: 2011-11-20 22:02:10+00:00
State: open

Similar to ActiveRecord Mongoid should support the "before_add", "after_add", "before_remove", "after_remove" callbacks

Here is the ActiveRecord documentation: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html

There isn't even really a workaround currently as before_save doesn't call on the parent due to the atomic push.

A previous issue #461 mentions this same issue and references a mysterious pull request that included this functionality.