-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I was wondering if autosave triggers any save or update callbacks on the referenced document. It seems not to be doing so. Is it expected behavior? e.g.:
class Product include Mongoid::Document has_and_belongs_to_many :customers, autosave: true before_save :do_stuff def do_stuff # never called end end class Customer include Mongoid::Document has_and_belongs_to_many :products, autosave: true end Customer.create! products: [Product.first] Product.first.customers.count # => 1 # But it never calls do_stuff
Thanks!