Get Client IP


#1

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


#2

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’]