Mateus Pontes
Mateus Pontes
@johnnyshields so I can pause this POC and wait your PR.
@johnnyshields pls tell me if I can help you with code or something like that.
@mpetazzoni I'm facing the same problem. I'm using [bopm/mongoid_relations_dirty_tracking](https://github.com/bopm/mongoid_relations_dirty_tracking) to track modifications but it post all embeds_many to history_track and after that my embeds_many data are duplicated ([see this commit](https://github.com/Polarion/mongoid_relations_dirty_tracking/commit/1dfbd17d2b7937ffb80819f57a820e299666517f))....
@johnnyshields thx for your help, your code works for me but I end up with my embeds duplicated, I'm using mongo 3.4 Something like that: ```json { "customer": { "name":...
@johnnyshields I'm using rails 4.2.7 and mongoid 5.2, the issue is related to bopm/mongoid_relations_dirty_tracking, without mongoid_relations_dirty_tracking I cann't store relations changes. IMHO mongoid-history should track embeds changes as it can...
After update parent (with mongoid_relations_dirty) `action.update(action_params)`. Without mongoid_relations_dirty I cann't see embeds diff, mongoid-history doesn't track it. That was the motivation to PR. ```json > db.actions.findOne({"_id": ObjectId("5903a7f07ce04a617e3c3bf1")}) { "_id" :...
``` def modified_attributes_for_update @modified_attributes_for_update ||= Mongoid::History::Attributes::Update.new(self).attributes end ``` always returns nil when you update only the child.
@JagdeepSingh in create we track changes on embedded relations, can we use the same aproach to catch changes on update?
I'll create a new PR with a new aproach to solve this without extra gems, this is working with embed_one only for now. It's a WIP ```ruby [#"Parent", "id"=>BSON::ObjectId('58efcf927ce04a71b049aac5')}], modified:...
@Marcuspo please, try to enter into the package folder and run `yarn build`, the original repo doesn't have any script to build tsc after installation.