X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/ee6f1fad9951a2dc499e780db0d0867dac594f6a..45532efec547148def34ac29a1ea1c9652420d37:/app/controllers/election_controller.rb?ds=sidebyside 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