fix poll accuracy results using floats
This commit is contained in:
@@ -46,7 +46,7 @@ class Poll::Question::Answer < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def total_votes_percentage
|
||||
question.answers_total_votes.zero? ? 0 : (total_votes * 100) / question.answers_total_votes
|
||||
question.answers_total_votes.zero? ? 0 : (total_votes * 100.0) / question.answers_total_votes
|
||||
end
|
||||
|
||||
def set_most_voted
|
||||
|
||||
Reference in New Issue
Block a user