How do I get the IP address of form poster?

How can I capture the IP address of a user who is posting my sign-in or
login forms? I want to store it as part of my user information so that
if I want to block the user in the future, I can also block the IP
address they used to sign in.

thanks,
jp

Jeff,

request.env[‘REMOTE_ADDR’]

should do the trick.

Zack

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs