Forum: Ruby on Rails Retrieving requester IP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James E. (Guest)
on 2008-11-29 19:29
(Received via mailing list)
Hey All,
   How can you access the requesting computer's IP address?

Thanks,
Jim Englert
Greg W. (Guest)
on 2008-11-29 21:07
(Received via mailing list)
On Nov 29, 2008, at 9:28 AM, James E. wrote:

> How can you access the requesting computer's IP address?

In a controller you can use request.remote_ip. So...

   @visitor_ip = request.remote_ip

-- gw
This topic is locked and can not be replied to.