Reputation: 1855
I want an archive system where if a post is updated its previous version is archived so it can be restored. Same goes for if a recored was deleted it can also be restored by a user.
The user can see all previous updates and go back to them if they want.
I found some gems for this a while back but cant find them again now that I'm looking to implement it. I have found acts as archival but thats all. And it only works for archiving deleted records.
What other gems are out there?
Upvotes: 1
Views: 56
Reputation: 557
I believe paper_trail will do what you want. It tracks changes in a separate table and you can traverse the changes. I have used it and it does the job.
PaperTrail
Track changes to your models, for auditing or versioning. See how a model looked at any stage in its lifecycle, revert it to any version, or restore it after it has been destroyed.
https://github.com/airblade/paper_trail
Upvotes: 2