I am currently trying to round off a float number but i get an error message like: undefined method round_to for float 16.666667.. and my code for rounding off is
option = [keys[count], (((o.poll_votes.count.to_f)/@general_poll.poll_votes.count.to_f)*100).round_to(1)]
And what suprises me the most is that i have used this code at several places and is working just fine..but now is giving me errors.
thanks in advance.