Active Record Audit History

We plan to make some table audits included in our Rails3 application. We looked at paper_trail and it seems that we saved all the versions, but I was not sure if there was a mechanism to find the b / w difference, which field changed in future versions. Would it be possible to do this with a paper gem or use something like vestal_versions for this opportunity?

+4
source share
1 answer

You can achieve this with paper_tail gem. If you add the text column object_changes to the version table, you can use the version.changeset method to retrieve it. If you have not already done so, I recommend going to the "Diffing Versions" section at https://github.com/airblade/paper_trail

ps I am using paper_trail in one of my projects currently.

+3
source

Source: https://habr.com/ru/post/1398555/


All Articles