Added a check to make sure a voter has a valid email address before attempting ot...
author<jlsharps@mit.edu> <>
Fri, 9 May 2008 20:56:16 +0000 (16:56 -0400)
committer<jlsharps@mit.edu> <>
Fri, 9 May 2008 20:56:16 +0000 (16:56 -0400)
app/controllers/election_controller.rb

index 94c203d104c902de9dd673a3713ad0c2e76a9fa7..6faaf22bd0f28548b407b1a4bc6a0e7d0a2b91ea 100644 (file)
@@ -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!

Benjamin Mako Hill || Want to submit a patch?