Best way to implement voting in a Rails application?

你说的曾经没有我的故事 提交于 2019-12-04 08:41:30

问题


What's the best plugin these days for implementing voting on a Rails site?

Two I'm aware of are:

  1. vote_fu
  2. acts_as_voteable

回答1:


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.




回答2:


Coming in a bit late here, but from what I can tell vote_fu was inspired by acts_as_voteable (and supports its syntax), but is more actively developed.




回答3:


vote_fu is very outdated and isn't compatible with modern rails distributions (I'm using 3.2.5). Thumbs_up has replaced it form Rails 3.x development. Go with that or either acts_as_votable as they are still being maintained.

Thumbs_up has some extra options like built-in karma tracking.



来源:https://stackoverflow.com/questions/1397845/best-way-to-implement-voting-in-a-rails-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!