+7  A: 

You should look at the request object that's available from the controller. There are a bunch of methods like

request.remote_ip

you can read more about the Request object on the Rails API site

Scott
Thanks for the answer , but why i press the link but i cant find request object documentation anymore?
wizztjh