aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-11-16 12:58:49 -1000
committerAndre Arko <andre@arko.net>2011-11-16 13:13:22 -1000
commita9044d011790063e17159209f7bb1cbea255d4dd (patch)
tree52396455ec6e4574ea5c7dc51ce774025366235b
parent5621abd5698536f1676306930f6aef105d7ae6dc (diff)
downloadrails-a9044d011790063e17159209f7bb1cbea255d4dd.tar.gz
rails-a9044d011790063e17159209f7bb1cbea255d4dd.tar.bz2
rails-a9044d011790063e17159209f7bb1cbea255d4dd.zip
the object itself isn't the IP, #to_s is the IP
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index 4e6feb708e..69ca050d0c 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -157,7 +157,7 @@ module ActionDispatch
# Originating IP address, usually set by the RemoteIp middleware.
def remote_ip
- @remote_ip ||= @env["action_dispatch.remote_ip"] || ip
+ @remote_ip ||= (@env["action_dispatch.remote_ip"] || ip).to_s
end
# Returns the unique request id, which is based off either the X-Request-Id header that can