PatrickB
2006-Sep-21 16:35 UTC
Call to session[:somevalue] returns the error "Symbol as array index"
I hope you can help me with this In a controller I make a call to session[:user_id] in order to retrieve the value that has previously been assigned to the session object by a login method. The result is the error "Symbol as array index", so rails for some reason just thinks session is any other array. I have tried prefixing the call with @request so that it goes: somevariable = @request.session[:user_id] But this just gives an error saying that @request is not initialised, making the call equal to nil.session Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---