在Rails应用程序中实现投票的最佳方法? [英] Best way to implement voting in a Rails application?
问题描述
如今,在Rails网站上实现投票的最佳插件是什么?
What's the best plugin these days for implementing voting on a Rails site?
我知道的两个是:
- vote_fu
- acts_as_voteable
推荐答案
没有通用的最佳"解决方案.查看两者的工作原理,并找出最适合您所需的内容以及最适合您的应用程序需求的内容.在这种情况下,acts_as_votable允许对模型进行投票.当它宣传"acts_as_voter"的概念以限制可以投票的模型时,vote_fu包含了更多内容.它还添加了"has_karma"以基于用户投票来提供业力.
There's no general 'best' solution. Check out how both work and see what best fits what you want and what fits your application's needs. In this case, acts_as_votable allows voting on models. vote_fu contains more as it ads the concept of 'acts_as_voter' to limit the models that may vote. It also adds 'has_karma' to give karma based on user voting.
如您所见,两者都是不同的选择,只有您知道最适合您的需求.
As you see, both are different options and only you know what best fits your needs.
这篇关于在Rails应用程序中实现投票的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!