From 470841e3dadf521027037fe18dc405915ed69c06 Mon Sep 17 00:00:00 2001 From: John Dong Date: Fri, 17 Aug 2007 18:25:53 -0400 Subject: [PATCH] Also expose voter's Session ID --- app/apis/selectricity_api.rb | 1 + app/models/selectricity_service.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/apis/selectricity_api.rb b/app/apis/selectricity_api.rb index b1210c6..dfc9946 100644 --- a/app/apis/selectricity_api.rb +++ b/app/apis/selectricity_api.rb @@ -7,6 +7,7 @@ class ElectionStruct < ActionWebService::Struct end class VoteInfo < ActionWebService::Struct member :voter_id, :int + member :voter_session_id, :string member :voter_ipaddress, :string member :vote_time, :int member :vote, [:int] diff --git a/app/models/selectricity_service.rb b/app/models/selectricity_service.rb index 6d338de..add8154 100644 --- a/app/models/selectricity_service.rb +++ b/app/models/selectricity_service.rb @@ -80,7 +80,7 @@ class SelectricityService < ActionWebService::Base return result end qv.votes.each do |vote| - votes << VoteInfo.new(:voter_id => vote.voter.id, :voter_ipaddress => vote.voter.ipaddress, :vote_time => vote.time.to_i, :vote => vote.votes) + votes << VoteInfo.new(:voter_id => vote.voter.id, :voter_ipaddress => vote.voter.ipaddress, :vote_time => vote.time.to_i, :vote => vote.votes, :voter_session_id => vote.voter.session_id ) end return votes end -- 2.39.5