Updated the system to Rails 1.2.
[selectricity-live] / app / controllers / quickvote_controller.rb
index 7c754746959b70573da798003fb63643b81ea899..5e29a10caa2e2d529761666f8e2c0864bbf6f59c 100644 (file)
@@ -105,7 +105,7 @@ class QuickvoteController < ApplicationController
       
     else
       # record the ip address for posterity
-      @voter.ipaddress = request.env["REMOTE_ADDR"]
+      @voter.ipaddress = request.env["HTTP_X_FORWARDED_FOR"]
       @voter.save
       
       # toggle the confirmation bit
@@ -161,7 +161,9 @@ class QuickvoteController < ApplicationController
     @condorcet_result = PureCondorcetVote.new(preference_tally).result
     @ssd_result = CloneproofSSDVote.new(preference_tally).result
     @borda_result = BordaVote.new(preference_tally).result
-    @runoff_result = InstantRunoffVote.new(preference_tally).result
+    #@runoff_result = InstantRunoffVote.new(preference_tally).result
+    #@runoff_results = PluralityVote.new(preference_tally).result
+
 
     @candidates = {} 
     @election.candidates.each {|c| @candidates[c.id] = c}

Benjamin Mako Hill || Want to submit a patch?