Method: ActionDispatch::Request#remote_ip
- Defined in:
- actionpack/lib/action_dispatch/http/request.rb
#remote_ip ⇒ Object
Returns the IP address of client as a String, usually set by the RemoteIp middleware.
312 313 314 |
# File 'actionpack/lib/action_dispatch/http/request.rb', line 312 def remote_ip @remote_ip ||= (get_header("action_dispatch.remote_ip") || ip).to_s end |