def get_quickvote_results(shortname)
#TODO: Validate shortname
qv=QuickVote.ident_to_quickvote(shortname)
- result=VoteResultStruct.new
+ result=QuickVoteResultStruct.new
unless qv
raise ArgumentError.new("No quickvote with name #{shortname} found!")
end
end
def get_quickvote_candidate_map(shortname)
qv=QuickVote.ident_to_quickvote(shortname)
- result=CandidateMap.new
+ result=QuickVoteCandidateMap.new
unless qv
raise ArgumentError.new("No quickvote with name #{shortname} found!")
end
end
qv.votes.collect do |vote|
- VoteInfo.new(:voter_id => vote.voter.id,
+ QuickVoterInfo.new(:voter_id => vote.voter.id,
:voter_ipaddress => vote.voter.ipaddress,
:vote_time => vote.time.to_i,
:vote => vote.votes,
raise ArgumentError.new("Cannot find QuickVote named #{shortname}")
end
- ElectionStruct.new(
+ QuickVoteStruct.new(
:id => election.id,
:name => election.name,
:description => election.description,