您如何评价同一对象的多个属性?
我还没有看到这个功能作为插件,并且想知道如何实现它,希望使用 Rails。
我所追求的功能是能够在一页/表格上通过各种属性(例如情节、娱乐性、原创性等)对一个对象(一部电影)进行评级。
有人可以帮忙吗?
I've not seen this feature as a plug in and was wondering how to achieve it, hopefully using rails.
The feature I'm after is the ability to rate one object (a film) by various attributes such as plot, entertainment, originality etc etc on one page/form.
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不认为你需要一个插件来做到这一点...你可以使用 AR 执行以下操作
当然,通过这种方法,你可以在评级名称中进行复制,这并不是那么糟糕(标准化表格只是为了一个字段并不能解决问题)。
I don't think you need a plugin to do just that... you could do the following with AR
Of course, with this approach you would have a replication in the Rating name, something that is not that bad (normalize tables just for one field doesn't cut it).
您还可以使用插件 ajaxfull- rating
You can also use a plugin ajaxfull-rating
这是另一个可能更强大的评级插件...它已经存在了一段时间,并且已经过修改以与 Rails 2 配合使用
http://agilewebdevelopment.com/plugins/acts_as_rateable
Here's another, possibly more robust rating plugin...it's been around for a while and has been revised to work with Rails 2
http://agilewebdevelopment.com/plugins/acts_as_rateable