Displaying 1 result from an estimated 1 matches for "vote_up".
Did you mean:
vote_map
2007 Jun 04
1
acts_as_rateable in Beast
...voting but
I''m having some problems setting it up and the documentation seems
outdated.
(http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/)
So far, I''ve added acts_as_rateable to my posts model and I''ve added
this method to my controller:
def vote_up
return unless logged_in?
rateable = @rateable_class.find(params[:id])
# Delete the old ratings for current user
Rating.delete_all(["rateable_type = ? AND rateable_id = ? AND
user_id = ?", @rateable_class.base_class.to_s, params[:id],
@current_user.id])
rateable.add_rat...