Forum: Ruby on Rails Get Client 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.
E097e05db53608b7855d91705c5e7516?d=identicon&s=25 Matthew Lagace (turnkeytraders)
on 2007-07-16 18:58
Hello,

I have a form that creates a new client. My form works fine, but I would
like to have a hidden field with the client's IP as its value. How can I
get a client IP with rails?

Thanks
Ff168162d53e22788d576582b3527e97?d=identicon&s=25 Bill Kocik (Guest)
on 2007-07-16 22:03
(Received via mailing list)
On Jul 16, 12:58 pm, Matthew Lagace <rails-mailing-l...@andreas-s.net>
wrote:
> Hello,
>
> I have a form that creates a new client. My form works fine, but I would
> like to have a hidden field with the client's IP as its value. How can I
> get a client IP with rails?


request.env['REMOTE_ADDR']
This topic is locked and can not be replied to.