If I were to implement a system identical to the question change history in StackOverflow using Ruby on Rails , what do I need to do for this? I am creating a website that acts like a wiki where user-generated content can be updated by other people. I need to be able to track the history of these changes, but I do not know how to implement this.
Decision:
In short, the way this works is to create an extra table to track changes. Each row of the table has a βsnapshotβ of the data that existed before the record was changed (or only the data that was changed).
There are a number of Ruby Gems that have already done most of the work. The following is a list of gems associated with the version / version of the story . It seems Paper Trail is currently the most popular stone for this. Ryan Bates recorded RailsCast, giving an overview of using Paper Trail .
ruby-on-rails ruby-on-rails-3 rubygems
Andrew
source share