VoteFu 0.0.7

Written by pete

Topics: Code, Rails, Ruby

A couple of contributors forked VoteFu and submitted some patches. I’ve updated the master branch to integrate the changes. Notably:

  • VoteFu now works as a standard gem in a Ruby application. (i.e. not as a Rails plugin)
  • VoteFu now works as a Rails Gem Plugin.
  • VoteFu now works with Rails 2.2.2.
  • Other assorted small bugfixes.

To install VoteFu as a Gem Plugin:

sudo gem install peteonrails-vote_fu

Then in config/environment.rb:

  config.gem "peteonrails-vote_fu", 
     :source => "", 
     :lib => "vote_fu"

And then, optionally:

rake gems:unpack

Special thanks to Jon Maddox and Bence Nagy for the updated code. Check it out yourself!

  • Eric

    Vote Fu and STI: I noticed that Vote Fu did not work with STI'd classes. This is because the types stored in the Vote table is always the base type, but the voteable and voter modules use in their queries. Changing these methods to use makes it work perfectly though. :) Great plug in. Very useful!

  • nick

    Any idea how to mix the tally stuff with will_paginate? I've tried, but it didn't quite work out...

  • I've not had a problem doing this. What problems are you encountering? What version of will_paginate are you using?

  • nick

    Nevermind, I figured it out!
    Thanks anyway!

  • nick

    the latest mislav_will_paginate on github.

    If you say it should work, then what (in general) should my controller code look like?

blog comments powered by Disqus