X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/07c4c28f94d7628c0d5c48db810956f680c5f48e..2ee3731fd7cc776524f44005a99035d01168e6c0:/app/controllers/election_controller.rb diff --git a/app/controllers/election_controller.rb b/app/controllers/election_controller.rb index eff920f..1affe0f 100644 --- a/app/controllers/election_controller.rb +++ b/app/controllers/election_controller.rb @@ -152,6 +152,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