it''s request.remote_addr, not request.remote_ip
On Sun, Feb 24, 2008 at 3:00 PM, Roy Quader <
rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> Hello everyone,
>
> I am trying to use request.remote_ip in my application to log a
user''s
> IP address because I have been having a lot of abuse issues. basically
> when a user logs I simply call user.update_attribute(:last_ip,
> request.remote_ip). The problem is that for some reason a lot of people
> that have recently logged in still have NULL listed as their last_ip in
> the database, even though it properly updates mine when I log in. Why
> would request.remote_ip be null, and is there a way that I can at least
> get some sort of IP address? I don''t understand how
request.remote_ip
> isn''t working when I see the users'' IP addresses in my
production.log.
>
> If anyone has any ideas please help me out. Thanks!!
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---