session.session_id, @election.id])[0]
unless @voter
@voter = QuickVoter.new
- @voter.election = Election.find_all( [ "name = ?", params[:votename] ] )[0]
+ @voter.election = QuickVote.find_all( [ "name = ?", params[:votename] ] )[0]
end
end
@voter = QuickVoter.new()
@voter.election = election
@voter.session_id = session.session_id
+ @voter.ipaddress = request.env["REMOTE_ADDR"]
@voter.save
@voter.reload
end
def results
- @election = Election.find_all( ["name = ?", params[:votename]] )[0]
+ @election = QuickVote.find_all( ["name = ?", params[:votename]] )[0]
preference_tally = []
plurality_tally = []