-
Type: Bug
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Associations, Callbacks
-
None
Hey,
I have the following model
class Person include Mongoid::Document store_in collection: :persons has_and_belongs_to_many :products #hook before document is saved before_save do |document| puts changed.inspect end end
When i do
person.products.push(product) person.save
The "changed.inspect" results in an empty Hash
[]
Where i expect to see ["product_ids"]
person.products.delete(product) person.save
In this case the "changed.inspect" results in
["product_ids"]
All documents are saved correctly and we use version 4.0.0.beta1