X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/9129a21b28c88064edfcfc8a8fa23a640f29819c..01bd9222d9ddec98586fb7c30413ab298d07b8a7:/app/controllers/election_controller.rb diff --git a/app/controllers/election_controller.rb b/app/controllers/election_controller.rb index 94c203d..bfef021 100644 --- a/app/controllers/election_controller.rb +++ b/app/controllers/election_controller.rb @@ -76,13 +76,18 @@ class ElectionController < ApplicationController :locals => { :page => 'review' } @election = Election.find(params[:id]) + if @election.type == QuickVote + redirect_to(:controller => 'quickvote', :action => 'index', :ident => @election.id) + end + end 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!