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.
Matthew L. (Guest)
on 2007-07-16 20: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
Bill K. (Guest)
on 2007-07-17 00:03
(Received via mailing list)
On Jul 16, 12:58 pm, Matthew L. <removed_email_address@domain.invalid>
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.