質問

We are planning to make some of the tables audit enabled in our Rails3 application. We did look at paper_trail and it seems to store all the versions, but I wasn't sure if there was a mechanism to find the difference b/w what field changed within successive versions. Would it be possible to do with the paper_trail gem or should I use something like vestal_versions for this capability?

役に立ちましたか?

解決

You can achieve that with paper_tail gem. If you add an object_changes text column to your versions table, you can use the version.changeset method to retrieve it. If you haven't yet, I recommend going through 'Diffing Versions' section in https://github.com/airblade/paper_trail

p.s. I am using paper_trail in one of my projects currently.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top