plataformatec/devise — pull request #1398 by salidux (2011-10-22 14:05:29+00:00)
Title: Trackable fails behind a proxy

If you are behind a non transparent proxy (Apache mod_proxy), user current_ip always returns proxy ip because it uses remote_ip to get user ip (http://apidock.com/rails/ActionController/Request/remote_ip).

I changed it to use request.ip who checks HTTP_X_FORWARDED_FOR header