X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/5aba48adb5fc188efeddc38675abd5e1e3a88844..f8ebf16c9444c239928d730d1f84275b90d733e6:/app/controllers/election_controller.rb diff --git a/app/controllers/election_controller.rb b/app/controllers/election_controller.rb index 94c203d..6faaf22 100644 --- a/app/controllers/election_controller.rb +++ b/app/controllers/election_controller.rb @@ -80,9 +80,10 @@ class ElectionController < ApplicationController def start_election @election = Election.find(params[:id]) + @election.voters.each do |voter| voter.vote = Vote.new - email_voter voter + email_voter voter unless voter.email.nil? end @election.activate!