]> projects.mako.cc - selectricity/blobdiff - app/controllers/election_controller.rb
QuickVotes are now displayed in the control panel list - and you can click on
[selectricity] / app / controllers / election_controller.rb
index 94c203d104c902de9dd673a3713ad0c2e76a9fa7..bfef0215377bc7547616dd343c81ecf8226aee83 100644 (file)
@@ -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!

Benjamin Mako Hill || Want to submit a patch?