History of editions of a Ruby model on Rails

Asked

Viewed 141 times

1

I would like to know how to create a history with all the edits made in a template, in ruby on Rails.

1 answer

2

There are multiple record versioning Gems. The best known is Papertrail. This Gem creates a table that saves the history of all changes of the monitored models, including can associate to the user who made the change.

Adding the Papertrail to your design is quite simple. Just include gem 'paper_trail' in Gemfile, create the versioning table, and add has_paper_trail in the classes you want to see.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.