X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/7963fe06622ddbda89c0b6d6431339f26b9d6ecf..ca25ff5b7d32b8c3d94dfcbad2e9c3a3cbe21280:/app/controllers/election_controller.rb diff --git a/app/controllers/election_controller.rb b/app/controllers/election_controller.rb index eff920f..89a2c22 100644 --- a/app/controllers/election_controller.rb +++ b/app/controllers/election_controller.rb @@ -5,8 +5,6 @@ class ElectionController < ApplicationController require_dependency "candidate" layout 'main' - #before_filter :login_required - ## methods for displaying, creating, ## and manipulating election overview data #################################################################### @@ -152,6 +150,14 @@ class ElectionController < ApplicationController voter.destroy end + def remind_voter + voter_array= FullVoter.find(:all, :conditions => ["email = ?", params[:email]]) + voter_array.delete_if {|voter| voter.election.active == 0} + unless voter_array.empty? + VoterNotify.deliver_reminder(voter_array) + end + end + ## methods for computing and printing results #################################################################### def results