主持岗位 - 版本表 [英] moderated posts - versioned table
问题描述
我要创建CMS在这里创建和更新的帖子必须主持。 IE浏览器。用户Bill更新后 - 新的内容是什么地方存储在数据库中。除非CMS管理员接受比尔的帖子游客应该看到比尔的更新之前的文章内容。当CMS管理员接受新的帖子内容看观众新鲜的版本。
I'm creating CMS where created and updated posts have to be moderated. Ie. user Bill updates post - new content is stored somewhere in database. Unless cms-admin accepts Bill's post visitors should see post content before Bill's update. When cms-admin accepts new post content visitors see fresh version.
我想用acts_as_versioned或acts_as_revisible但没有做的正是我想要的。你有没有与该课题的经验吗?
I think about using acts_as_versioned or acts_as_revisible but neither do exactly what I want. Do you have any experience with that topic?
ML
推荐答案
您可以使用一个版本的插件像 acts_as_versioned
或 vestal_versions
( railscasts.com )
You could use a versioning plugin like acts_as_versioned
or vestal_versions
(railscasts.com)
假设你有发表
模式,您可以添加像 display_version
字段。用户将总是看到对应的版本号后的 display_version
的版本。仅在CMS管理员将能够改变在这个字段中的数字为新版本
Assuming you have Post
model, you could add a field like display_version
. Users would always see the version of the post corresponding to the version number in display_version
. Only the cms-admin would be able to change the number in this field to the new version.
这篇关于主持岗位 - 版本表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!