Hi all, is it possible to get/restore a session by the session_id in a controller action? I''m using a flash component (MultiPowUpload) which unfortunately doesn''t pass cookies when calling an action. Therefore I have coded the session_id into the called URL. Now in the controller action I receive the session_id as a param and want to check whether there is a corresponding session and read the user data. Is there a way to do this?? Thanx, Starburger -- 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 -~----------~----~----~----~------~----~------~--~---
yes when you are implementing session then you can fetch the session id using session[:user] and compare it with the user id -- 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 -~----------~----~----~----~------~----~------~--~---
On 1 Nov 2007, at 11:02, Star Burger wrote:> > Hi all, > > is it possible to get/restore a session by the session_id in a > controller action? > > I''m using a flash component (MultiPowUpload) which unfortunately > doesn''t > pass cookies when calling an action. Therefore I have coded the > session_id into the called URL. > > Now in the controller action I receive the session_id as a param and > want to check whether there is a corresponding session and read the > user > data. > > Is there a way to do this??Rails can do it for you, however it''s been turned off recently. I forget the exact details, but it can definitely be done. Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dhaval Parikh wrote:> yes when you are implementing session then you can fetch the session id > using session[:user] and compare it with the user idThe problem is, that the call doesn''t pass the session cookie - so there simply is no session object to compare. The only thing which is passed is the session_id as a parameter. So I need to access the session object based on the session_id. -- 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 -~----------~----~----~----~------~----~------~--~---