Get Client IP

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

On Jul 16, 12:58 pm, Matthew L. [email protected]
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’]