X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/49997d3063f434e33e64040fdb57ba30f4e4c2a8..22f84a3ea8bc39eb4cb91575d35dfca683336032:/app/controllers/quickvote_controller.rb diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 7c75474..61a4c69 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -10,6 +10,7 @@ class QuickvoteController < ApplicationController ############################################################# def create + breakpoint if params[:quickvote] @quickvote = QuickVote.new(params[:quickvote]) @@ -66,7 +67,7 @@ class QuickvoteController < ApplicationController @voter = nil end - # if the voter does not exist or as has been destroyed, lets + # if the voter does not exist or has has been destroyed, lets # create a new one unless @voter # create a new voter and populate it @@ -105,7 +106,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 +162,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}