X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/c5fda1e5174238779afd496014379d6446d1e3c1..4efa3e9bc47cc649205a399fde51ed7e61bef7f8:/app/models/vote.rb?ds=inline diff --git a/app/models/vote.rb b/app/models/vote.rb index 82f34a9..429e212 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -36,7 +36,7 @@ class Vote < ActiveRecord::Base destroy_rankings self.votes.each_with_index do |candidate, index| ranking = Ranking.new - ranking.rank = index + 1 + ranking.rank = index ranking.candidate = Candidate.find(candidate) self.rankings << ranking end