Skip to content

Commit

Permalink
the object itself isn't the IP, #to_s is the IP
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Nov 16, 2011
1 parent 5621abd commit a9044d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/http/request.rb
Expand Up @@ -157,7 +157,7 @@ def ip


# Originating IP address, usually set by the RemoteIp middleware. # Originating IP address, usually set by the RemoteIp middleware.
def remote_ip def remote_ip
@remote_ip ||= @env["action_dispatch.remote_ip"] || ip @remote_ip ||= (@env["action_dispatch.remote_ip"] || ip).to_s
end end


# Returns the unique request id, which is based off either the X-Request-Id header that can # Returns the unique request id, which is based off either the X-Request-Id header that can
Expand Down

0 comments on commit a9044d0

Please sign in to comment.