Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 2.65 KB

File metadata and controls

87 lines (65 loc) · 2.65 KB
* Support mongoid ~> 2.0, mongo_mapper ~> 0.9
* Replace votee_type to votee_class
* Bug fixes
* Update gem description
* Add MongoMapper support
* Simplify voting algorithm
* vote / revote / unvote always return voteable object (votee)
* Tasks module bug fixes
* Fix gem release bug
* Rename to voteable_mongo to support other MongoDB Object-Document Mappers like MongoMapper
* Minor fixes and refactoring
* Add Votee#up_voters(VoterClass), Votee#down_voters(VoterClass), Votee#voters(VoterClass)
* Add Voter scopes: Voter.up_voted_for(votee), Voter.down_voted_for(votee), Voter.voted_for(votee)
* Add voteable ..., :index => true options
* Optimization on unvote and revote validations
* Fix for :up & :down points are nil in rake tasks
* Add :return_votee => true option to vote function to warranty always return voteable object
* Add Votee.voted?, Votee.up_voted?, Votee.down_voted?
* Update parent for ManyToMany relationship
* Refactor
* Use Collection#find_and_modify to retrieve updated votes data and parent_ids (don't need an extra query to get parent_ids)
* Add votee#voted_by?(voter or voter_id)
* Better doc
* Refactor & cleanup source code
* Use readable field names (up, down, up_count, down_count, count, point) instead of very short field names (u, d, uc, dc, c, p)
* Drop Voter#votees, Voter#up_votees, Voter#down_votees in favor of Votee#voted_by(voter), Votee#up_voted_by(voter), Votee#down_voted_by(voter) scopes
* Add rake db:mongoid:voteable:migrate_old_votes to migrate vote data created by version < 0.6.0 to new vote data storage
* Fix bug: use before_create instead of after_after_initialize
* Set counters and point to 0 for uninitialized voteable objects in order sort and query
* Minimize vote data store (using short field names votes.u, votes.d, votes.c ...)
* Add Voter#up_votees, Voter#down_votees
* Remove index and scope from statistic module. User have to add indexes and scopes manually (see https://github.com/vinova/simple_qa/blob/master/app/models/question.rb)
* Bug fixes
* Rename vote_point to voteable
* Can use rake db:mongoid:voteable:remake_stats in Rails apps
* Use mongoid 2.0.0
* Add up_votes_count, down_votes_count
* Re-generate vote statistic data (counters and point)
* Wrap vote data in voteable namespace (voteable.up_voters_id, voteable.down_voters_ids, voteable.votes_count ...)
* Bug fixes
* Can unvote
* Use mongoid 2.0.0.rc