RE: logging a users ip address

Typically, this information is added to the access log by the web
server.

The Rails default logging also outputs this information, even in
production mode:

Processing # (for at ) GET

If you want to put this in the Rails log file in your own format, it can
be found in your request.env collection under REMOTE_HOST, e.g.

logger.info "Users IP: #{request.env['REMOTE_HOST']}"