4

I have a custom CMS implementation that stores content nodes in two tables as described in the "closure table" section at http://www.slideshare.net/billkarwin/models-for-hierarchical-data and using this gem https://github.com/mceachen/closure_tree under Ruby on Rails 3 and MySQL.

The time has come for me to implement a version history where any change in the content tree (editing, inserting, moving, deleting nodes, etc.) would create a new version of the root node (a publication). And users would be able to look at older versions and revert back to them. The revert action would create a newer version which is a copy of the reverted one.

Is there a well known way to achieve this? or does anyone have an idea or example implementation for this sort of thing?

Any input will be appreciated.

Rafael Vega
  • 4,575
  • 4
  • 32
  • 50

1 Answers1

1

State machines? I am curious if there are more ideas . I know for sure there is a brilliant solution , but it is out of Rails scope . This is document management system . The first I would recommend is Alfresco .

R Milushev
  • 4,295
  • 3
  • 27
  • 35