Recently in one of my projects I was required to add functionality to track all actions(create, update, delete), redo and undo to some models. In the project I am using Mongoid as a ODM. I can add most of these functionalities with mongoid-history. But mongoid-history can not track referenced relations. In my case I have Building model which has_many locations. When I update a location from building form(as nested attribute) then mongoid-history adds appropriate track(document) to history tracker collection but this document is not get related with the building object. Therefore when I call @building.history_tracks I can not get this history track. What would you suggest? Or am I doing something wrong?
Asked
Active
Viewed 1,107 times
1 Answers
1
Here is the solution I came up: http://www.elvinefendi.com/2012/06/23/added-new-features-to-the-mongoid-history-gem.html

hers19
- 146
- 2
- 6
-
I am unable to open the link you have provided. please check once. – anusha Sep 14 '15 at 05:05