diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 44e6055..f4b3b55 100755 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,9 +7,7 @@ def calculate_winner_preferential election election.ballots.each do |ballot| ballot.votes.each do |vote| - if vote.result == 1 - candidates[vote.choice_id] += 1 - end + candidates[vote.choice_id] += 1 if vote.result == 1 end end