]> projects.mako.cc - selectricity-live/blobdiff - app/controllers/quickvote_controller.rb
Updated the "votes_per_day" method in graph controller to work better and
[selectricity-live] / app / controllers / quickvote_controller.rb
index e7a285b7d45e7d0d8f8c22d2808b33a031a115ed..d842f63433cfec8f389b45904a6507f193975ec0 100644 (file)
@@ -1,5 +1,5 @@
 class QuickvoteController < ApplicationController
-  layout 'hc'
+  layout 'main'
   model :quick_voter
   model :quick_vote
   model :vote
@@ -12,7 +12,7 @@ class QuickvoteController < ApplicationController
   def create
     if params[:quickvote] 
       @quickvote = QuickVote.new(params[:quickvote])
-
+     
       # store the candidate grabbed through ajax and stored in flash
       @quickvote.candidatelist = flash[:candlist]
 
@@ -105,7 +105,7 @@ class QuickvoteController < ApplicationController
       
     else
       # record the ip address for posterity
-      @voter.ipaddress = request.env["BLAH"]
+      @voter.ipaddress = request.env["REMOTE_ADDR"]
       @voter.save
       
       # save the time the vote was made for statistical use, it doesn't

Benjamin Mako Hill || Want to submit a patch?