X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/dc635b6d39be19a09a428282b6d639d029908df6..feb38c08f5cbda03d540aef83fc056070e4b7b68:/app/controllers/quickvote_controller.rb?ds=inline diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 10815b3..5482a25 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -105,11 +105,16 @@ class QuickvoteController < ApplicationController else # record the ip address for posterity - @voter.ipaddress = request.env["HTTP_X_FORWARDED_FOR"] + @voter.ipaddress = request.env["REMOTE_ADDR"] @voter.save - # toggle the confirmation bit + # save the time the vote was made for statistical use, it doesn't + #work here unless I use a method that will save it to the db + @voter.vote.time = Time.now + + # toggle the confirmation bit @voter.vote.confirm! + @voter.reload render :action => 'thanks' end