end
def confirm
+
# we need the election to verify that we have the right voter
election = QuickVote.ident_to_quickvote(params[:ident])
@voter = QuickVoter.find(:all,
:conditions => ["session_id = ? and election_id = ?",
session.session_id, election.id])[0]
-
+
if not @voter
# we have not seen this voter before. something is wrong, try
# again
redirect_to quickvote_url( :ident => params[:ident] )
else
+
# record the ip address for posterity
@voter.ipaddress = request.env["REMOTE_ADDR"]
@voter.save