Search code examples
ruby-on-railsrevision-history

How to handle article revisions?


I'm creating a knowledge base web app in Ruby on Rails. I'm looking for various ideas on how to handle revisions of the same article.

At this point, I have a table called contents and versions. Versions belongs_to the Content table and has a foreign_key to content_ID. However, from this point on, I'm not sure how I'm going to implement saving to different versions, auto-save, and allow authors to recover from certain version and making a particular version as the current version. Any suggestions, opinions, and links are all appreciated.


Solution

  • Version control can be tricky but check out paper_trail: https://github.com/airblade/paper_trail