remote_ip()
Originating IP address, usually set by the RemoteIp middleware.
# File actionpack/lib/action_dispatch/http/request.rb, line 230 def remote_ip @remote_ip ||= (@env["action_dispatch.remote_ip"] || ip).to_s end