1 class VoterController < ApplicationController
9 password = params[:vote][:password] if params[:vote]
10 if @voter = FullVoter.find_all( [ "password = ?", password ] )[0]
11 render :action => 'fullvote'
17 # remove any existing votes and reload
25 @vote.votestring = params[:vote][:votestring]
28 redirect_to :action => 'index'
34 if Voter.find_all( ["session_id = ?", session.session_id ])[0]
35 flash[:notice] = "You have already voted!"
36 redirect_to quickvote_url( :votename => params[:votename] )
38 @voter = QuickVoter.new()
39 @voter.election = Election.find_all( [ "name = ?",
40 params[:votename] ] )[0]
41 @voter.session_id = session.session_id
45 @voter.vote = Vote.new
46 @voter.vote.votestring = params[:vote][:votestring]
49 render :action => 'thanks'
54 render :action => 'thanks'
56 redirect_to :action => 'index'
61 @voter = QuickVoter.new
62 @voter.election = Election.find_all( [ "name = ?", params[:votename] ] )[0]
67 password = params[:id]
68 @voter = FullVoter.find_all( [ "password = ?", password ] )[0]