+require 'uniq_token'
+
class ElectionsController < ApplicationController
model :raw_voter_list, :voter, :vote, :candidate
def process_incoming_voters(raw_voter_list)
incoming_voters = RawVoterList.new( raw_voter_list )
+ token_generator = UniqueTokenGenerator.new( 16 )
unless incoming_voters.entries.empty?
incoming_voters.each do |new_voter|
+ until new_voter.password and \
+ Voter.find_all( [ "password = ?", new_voter.password ]).empty?
+ new_voter.password = token_generator.token
+ end
+
+ breakpoint
if incoming_voters.email == 0
new_voter.contacted = 1
elsif incoming_voters.email == 1
@raw_voter_list = RawVoterList.new
@raw_voter_list.email = incoming_voters.email
end
+
+ def email_voter
+ end
+
end