list_quickvotes XMLRPC returns candidate ID's instead of names
[selectricity-live] / app / models / selectricity_service.rb
index da58f71a0aa59ee3a0a31ff2f208b787e20dd55d..e13037535bf04b37e290244feff0c21b597ee458 100644 (file)
@@ -79,7 +79,7 @@ class SelectricityService < ActionWebService::Base
   def list_quickvotes()
     all=Array.new
     QuickVote.find_all.each do |election|
-      all << ElectionStruct.new (:id => election.id, :name => election.name, :description => election.description)
+      all << ElectionStruct.new (:id => election.id, :name => election.name, :description => election.description, :candidates => election.candidates.collect {|c| c.id } )
     end
     return all
   end

Benjamin Mako Hill || Want to submit a patch?