acts_as_votable
acts_as_votable copied to clipboard
Votable ActiveRecord for Rails
Here is my web app environment: ``` Rails : 5.2.2 acts_as_votable : 0.12.0 ``` Here is the stack trace that i got: ``` …cts_as_votable-0.12.0/lib/acts_as_votable/cacheable.rb: 107:in `update_cached_votes' …/acts_as_votable-0.12.0/lib/acts_as_votable/votable.rb: 101:in `block in...
This is untested, but I was wondering if you'd accept a PR like this? It aims to solve https://github.com/ryanto/acts_as_votable/pull/173#issuecomment-753360866 and make it easier for other people to add similar callbacks.
Closes #181 Closes #127 I have also modernized a bit migration file style, validations and added a changelog file (style is adapted from `rubocop`). The most complicated part of this...
As the title says, destroying a voter does not update cached values in the votable, ie. votes by non-existent voters are still counted when looking at the votable.
This PR is a small refactoring that makes AAV use Rails' autoloading mechanisms to avoid using nested `require` calls. This fixes an issue in **development** where in some situations I...
As a new user of the gem, I would like to see that it works on my preferable database, without digging into source code to find than it hasn't (yet)...
`article.cached_votes_up` => 0 `10.times { Thread.new { user.likes article } }` `article.cached_votes_up` => 2 `article.get_up_votes` => `[{votable_id: 1, voter_id: 1}, { votable_id: 1, voter_id: 1 }]` Fix this issue please!
get_voted() simply returns an array of objects that the user has voted on, but does not say how the user has voted. To get that info, I have to use...
Hi! In my project users votes every day a lot (about ~5000 votes). User can voted for post only one time. So, I have a simple code > @post.liked_by current_user...
I've been thankfully using this gem for years, but only now noticed there are `count_votes_*` methods that correctly chooses between the cached or non-cached method. Would be nice to see...