Helpers in rails to get current IP number

Hello again,
how can I get my current IP address using Ajax helpers, in rails ?
I have found solution to get it with java functions :

but I would like to avoid using java, if it’s possible…
any idea ?

Thanks, Thib

@client_ip = request.remote_ip

Thanks to answer so quickly !
But, is it possible to get it with javascript, instead of ruby ? (if
an ajax helper exist for that…)

you can use $ip = $_SERVER[‘REMOTE_ADDR’];
in php script then get it with ajax