* removing helper to resolve remote_ip, and doing it the 'rails' way

This commit is contained in:
Seth Call 2013-10-01 21:49:41 +00:00
parent 2e27773511
commit b74ab7fda9
3 changed files with 1 additions and 11 deletions

View File

@ -31,7 +31,7 @@ class UsersController < ApplicationController
end
@signup_postback = load_postback(@invited_user)
load_location(remote_ip())
load_location(request.remote_ip)
@user = User.new
@user.musician = true # default the UI to musician as selected option

View File

@ -18,12 +18,4 @@ module ApplicationHelper
Rails.application.config.bugsnag_notify_release_stages.include? Rails.env
end
def remote_ip
if Rails.application.config.proxy_use_x_real_ip
request.env['X-Real-IP']
else
request.remote_ip
end
end
end

View File

@ -154,7 +154,5 @@ if defined?(Bundler)
config.ga_ua = 'UA-44184562-2' # google analytics
config.ga_suppress_admin = true
config.proxy_use_x_real_ip = false
end
end