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.

4

1 回答 1

1

状态机?我很好奇是否有更多的想法。我确信有一个绝妙的解决方案,但它超出了 Rails 的范围。这是文件管理系统。我推荐的第一个是 Alfresco 。

于 2012-11-19T17:08:14.830 回答