From: John Dong Date: Fri, 17 Aug 2007 22:25:53 +0000 (-0400) Subject: Also expose voter's Session ID X-Git-Url: https://projects.mako.cc/source/selectricity/commitdiff_plain/470841e3dadf521027037fe18dc405915ed69c06?ds=sidebyside Also expose voter's Session ID --- 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