Getting Started with Vote_fu
I have s开发者_Go百科uccessfully installed Vote_fu for rails 3, and have voted for the desired object in the console window, but I'm brand new to rails, so I really don't know how to implement a voting system in the controller. I'm really just looking for some direction, and I'll try to take it from there.
Thanks.
Everything is described at Github's vote_fu page
There are two methods vote_for
and vote_against
which you can use in your controller.
Before that, for sure, you have to add acts_as_voter
and acts_as_votable
to your models. Thats it
精彩评论