Jul 23
The lastest version of VoteFu has a few useful enhancements:
- Protect against mass assignment forgery. The params hash will only be consulted for :vote => true or false. The rest has to be assigned in the controller.
- The acts_as_voteable mixin now has support for tallying votes.
The documentation will be updated tonight, but briefly, here is what you can do with the new tally() method:
1 2 3 4 5 6 7 8 | @items = Item.tally( { :at_least => 1, :at_most => 10000, :start_at => 2.weeks.ago, :end_at => 1.day.ago, :limit => 10, :order => "items.name desc" }) |
This will select the Items with between 1 and 10,000 votes, the votes having been cast within the last two weeks (not including today), then display the 10 last items in an alphabetical list.
More to come. Enjoy!

Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.