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

Benjamin Mako Hill || Want to submit a patch?