thank you i got the answer



On Fri, Aug 21, 2009 at 8:16 PM, Alpha Blue <
[email protected]> wrote:

>
> @remote_ip = request.remote_ip
>
> if apache is behind a mongrel remote_ip might not work and you would
> have to do something similar:
>
> @remote_ip = request.env["HTTP_X_FORWARDED_FOR"]
>
> def login
>  @remote_ip = request.remote_ip
> ..
>  Your code
> ..
>  logger.error("test: IP: #...@remote_ip}" )
> end
>
> Check your logs.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to