Pattern to model wiki-type functionality
-
21-09-2019 - |
Question
Is there a pattern or a gem (Ruby on rails) for modeling the wiki-like behaviour of a StackOverflow like web site?
I'm working on Ruby-on-Rails project so a gem or something in RoR would be appreciated but a well defined pattern is just as good.
Thanks
Solution
Did you try act_as_versioned
? It is available as a gem, and adds simple versioning to any ActiveRecord model.
If you need more features, act_as_revisable
might be interesting. According to the link, it adds the following features on top of act_as_versioned
:
- Pervasive Callbacks
- Branching and Changesets
- Deletes can be stored as a revision
- Explicit is better than implicit
- All data for a model is stored in one table
- Wrapping up, requirements and installing
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow