Major update of Selectricity to work with Rails 2.2.2 from 1.2!
[selectricity] / app / models / selectricity_service.rb
diff --git a/app/models/selectricity_service.rb b/app/models/selectricity_service.rb
deleted file mode 100644 (file)
index c0adc8a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-require 'action_controller/integration'
-
-class SelectricityService < ActionWebService::Base
-  web_service_api SelectricityAPI
-  def cast_quickvote(election_id, vote_id, vote_list)
-    #Obviously not implemented
-  end
-  def get_quickvote_results(shortname)
-    #TODO: Validate shortname
-    qv=QuickVote.ident_to_quickvote(shortname)
-    result=VoteResultStruct.new
-    result.errors=[]
-    unless qv
-      result.errors << "No quickvote with name #{shortname} found!"
-      return result
-    end
-    qv.results
-    result.plurality_winners=qv.plurality_result.winners
-    result.approval_winners=qv.approval_result.winners
-    result.condorcet_winners=qv.condorcet_result.winners
-    result.ssd_winners=qv.ssd_result.winners
-    result.borda_winners=qv.borda_result.winners
-    candidates={}
-    qv.candidates.each {|c| candidates[c.id] = c.name}
-    result.candidate_ids=candidates.keys
-    result.candidate_names=candidates.values
-    result
-  end
-end

Benjamin Mako Hill || Want to submit a patch?