What I''d like to do: Capture the IP addresses of the folks visiting a web site in the Sessions table. What needs to be in place (code, model, controller, etc.), where does it need to go (application controller?), how best to set up the Sessions table? Appreciate a noob-friendly outline of what needs to be done. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 22, 2007, at 6:29 PM, MrLipid wrote:> What I''d like to do: > > Capture the IP addresses of the folks visiting a web site in the > Sessions table. > > What needs to be in place (code, model, controller, etc.), where does > it need to go (application controller?), how best to set up the > Sessions table? > > Appreciate a noob-friendly outline of what needs to be done.The ip address is available from request.remote_ip, as in: login_terminal = request.remote_ip don''t know how to extend the sessions schema though (I log it separately from sessions) -- gw (www.railsdev.ws) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 22, 9:41 pm, Greg Willits <li...-0Bv1hcaDFPRk211Z5VL+QA@public.gmane.org> wrote:> On Nov 22, 2007, at 6:29 PM, MrLipid wrote: > > > What I''d like to do: > > > Capture the IP addresses of the folks visiting a web site in the > > Sessions table. > > > What needs to be in place (code, model, controller, etc.), where does > > it need to go (application controller?), how best to set up the > > Sessions table? > > > Appreciate a noob-friendly outline of what needs to be done. > > The ip address is available from request.remote_ip, as in: > > login_terminal = request.remote_ip > > don''t know how to extend the sessions schema though (I log it > separately from sessions) > > -- gw (www.railsdev.ws)Appreciate the prompt response. Maybe I should have capitalized Noob. ;) Where would " login_terminal = request.remote_ip" go? Does it belong in a controller? Are there any other elements that must be present? Models, helpers, etc.? Where do you put the IP information that this yields? (I assumed it could go in Sessions but have no need for it to go there.) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---