make_voteable
make_voteable copied to clipboard
[Unmaintained] User-centric voting system for Rails 3 applications
I notice that rails 4.0 is already supported in 'master' branch, but not release it as a gem. could you please release a gem?
class Post < ActiveRecord::Base attr_accessible :type end class Link < Post end irb(main):012:0> User.first.up_vote! Link.first INSERT INTO `votings` (`created_at`, `up_vote`, `updated_at`, `voteable_id`, `voteable_type`, `voter_id`, `voter_type`) VALUES ('2012-10-14 07:15:41', 1, '2012-10-14...
Just curious -- what was the logic behind the bang methods being the safe methods and the non-bang methods being the ones that raise errors?
Should make_voteable models have a cached count for the voteable record, in addition to up_votes and down_votes? Right now, it seems there's no easy way to order records by total...
Let say we have User that inherits from ActiveRecord::Base and Admin that inherits from User. The User is a voter (make_voter). Creating an up / down vote for an instance...
I have a model which has some more complicated operations in before_save filter (parsing virtual attributes, finding or creating 2 associated models etc). When make_votable uses votable.save in vote actions...