brady8/thumbs_up — Issue #34: vote giving cannot convert symbol into an integer error
Author: Akram-Khan
Created: 2012-01-19 09:49:29+00:00
State: open

I need the ability to both vote up and vote down. I am using vote in this way :-

def vote_up
begin
current_user.vote(@post,true)
redirect_to [@topic.forum,@topic]
flash[:success] = "You have voted successfully"
rescue ActiveRecord::RecordInvalid
redirect_to [@topic.forum,@topic]
flash[:error] = "You have already voted for this one"
end
end

when I click on the link to vote up i get the error cannot convert symbol into an integer. Am I using vote in a wrong manner?

Thanks,
Akram