Questions tagged [acts-as-votable]

Acts As Votable is a Ruby on Rails gem that provides voting for models.

Acts As Votable is a Ruby Gem specifically written for Rails/ActiveRecord models. The main goals of this gem are:

  • Allow any model to be voted on, like/dislike, upvote/downvote, etc.
  • Allow any model to be voted under arbitrary scopes.
  • Allow any model to vote. In other words, votes do not have to come from a user, they can come from any model (such as a Group or Team).
  • Provide an easy to write/read syntax.

Link To Gem

80 questions
-1
votes
4 answers

rake db:migrate is aborted when migrating gem

im sure this is a simple enough error i just cant figure it out. I'm installing ryanto/acts_as_votable gem and i'm getting the following issue. There are issues similar but I cant find any fixes that can be implemented before the rake…
LiffeyD
  • 103
  • 6
-1
votes
1 answer

Ajax for voting on posts (stop page refresh)

I am using the gem "acts_as_votable" in my Rails application so that Users can vote on Posts. It all works fine. But if you upvote or downvote a post, the entire page refreshes. I want to change this by implementing Ajax, which should be the ideal…
naridi
  • 77
  • 2
  • 8
-1
votes
2 answers

Get value of votes from users posts

I have a model snippets in which a user can post a snippet. The snippet that they post can be voted on using the acts_as_votable gem. This is working perfectly, and when a user votes, the vote count of the snippet increases by one. Although, I am…
user6806935
-1
votes
2 answers

Why isn't my if else statement working in controller [Rails 4]

I'm trying to make the user be able to remove his upvote by re-clicking on the upvote button Here's my controller def upvote if current_user.voted_up_on? @post @post = Post.find(params[:id]) @currentUserLikes =…
Malek Zalfana
  • 318
  • 2
  • 11
-3
votes
1 answer

Does anyone know any useful gem to create voting system in Sinatra?

Hi I am creating a small Sinatra app and trying to create a voting system in it. I tried using acts_as_votable gem but it is giving me some error. rake db:migrate …
Hima Chhag
  • 401
  • 7
  • 22
1 2 3 4 5
6