Hi, When I log in from a form post to session/create there''s a call to User.authenticate (which in turn puts a :user variable in the session from the self.current_user call. My issue is when I call self.current_user = User.authenticate(...) from somewhere else and I redirect.. I lose my session variable. How could this happen? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
PatRoy wrote:> Hi, > > When I log in from a form post to session/create there''s a call to > User.authenticate (which in turn puts a :user variable in the session > from the self.current_user call. > > My issue is when I call self.current_user = User.authenticate(...) > from somewhere else and I redirect.. I lose my session variable. How > could this happen?you should post your code for more informative detail, but this could also be an issue of your browser .. ? -- 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 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 -~----------~----~----~----~------~----~------~--~---
Hi, I''m having the same problem. Were you able to solve this? Thanks for your help. PatRoy wrote:> Hi, > > When I log in from a form post to session/create there''s a call to > User.authenticate (which in turn puts a :user variable in the session > from the self.current_user call. > > My issue is when I call self.current_user = User.authenticate(...) > from somewhere else and I redirect.. I lose my session variable. How > could this happen?-- 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 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 -~----------~----~----~----~------~----~------~--~---
Maybe somewhere has the code "reset_session" or "session[:user] = nil" On Sun, Jan 18, 2009 at 2:41 PM, Jason Member < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > I''m having the same problem. Were you able to solve this? > > Thanks for your help. > > > PatRoy wrote: > > Hi, > > > > When I log in from a form post to session/create there''s a call to > > User.authenticate (which in turn puts a :user variable in the session > > from the self.current_user call. > > > > My issue is when I call self.current_user = User.authenticate(...) > > from somewhere else and I redirect.. I lose my session variable. How > > could this happen? > > -- > Posted via http://www.ruby-forum.com/. > > > >-- TWRUG Blog: http://blog.rubyonrails.org.tw CFC on Rails: http://zusocfc.blogspot.com Only two surfaces of a box: http://blog.pixnet.net/zusocfc --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---