-
Type: Improvement
-
Resolution: Incomplete
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.1.1
-
Component/s: Attributes
-
None
I was not able to find a mention of this issue in the history, my apologies if it has already been addressed or answered.
The Dirty module does not appear to be properly tracking changes to embedded documents. When embedded document attributes are changed via the nested attributes path, they do not appear in the parent level `changes` hash. In this example, the embedded document model is called "Post" and has a field titled "name". Parent embeds_many posts
parent.posts_attributes= {"0": {subject: "test"}}
parent.save
parent.changes
=> {}
Thank you for all of your work on mongoid. This behavior affects the mongoid-history gem issue #33.
- related to
-
MONGOID-3072 Callbacks not called on embedded document when not dirty (even with cascaded callbacks enabled)
- Closed