在我手动执行此操作之前,是否有一个很好的宝石/简单的方法可以在 Rails 3 中包含评级、收藏夹等内容?
我想手动完成此操作并不难,但我很好奇是否有简单的方法来包含“可评级”或“可收藏”等概念。我猜这真的很容易手工完成,但是有针对此类事情的标签库,它们还提供范围,标签云和具有正确索引策略的正确迁移......所以我想也许可能有类似的事情是包罗万象的,因为这些东西基本上都是相同的想法。
I guess it's not so hard to do this by hand, but I was curious if there was easy ways to include concepts like "Ratable" or "Favouritable" and so on. It's really easy to do by hand I guess, but there are tag libraries for this sort of thing that also provide scopes, tag clouds and the correct migrations with the right indexing strategies... so I thought maybe there might be a similar thing that is all encompassing since these things are basically the same idea.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Thumbs_up 和 Ajaxful rating 很好的解决了这个问题。在我的应用程序中成功使用。
Thumbs_up and Ajaxful rating are good solutions of this problem. Successfully used in my applications.
您可能想看看 Make Votable gem:
https://github.com/medihack/make_voteable
You may want to look at the Make Votable gem:
https://github.com/medihack/make_voteable