From: Xeno Campanoli Date: 2008-07-10T04:51:37+09:00 Subject: Re: Trying to find good examples of Ruby Sessions. Xeno Campanoli wrote: The way I'm trying to use this now is to initialize the session in a class method in my user object, and then always retrieve a class variable version of the session in the instantiator of the object. I am using all defaults, and I don't close the session in the class object, but merely execute update before letting go of the local scope. Then when I try to retrieve the session it just isn't there. Perhaps because it doesn't see the session cookie yet or something. Perhaps I need to just hold onto my created @Session value until following sessions... > Pickaxe 246 is not only weak, but appears to be just wrong by saying: > > if session['lastaccess'] > > which doesn't check that lastaccess is infact a hash key to begin with. > However, when I try a .has_key?, I get a failure with that (the above > fails as I expect also). So what gives? Is this just broken, or am I > not seeing an undocumented step that should be obvious to any > clairvoyent that dares use this? > > I also don't get enough from the core/classes/CGI/Session.html, which > does't give good example of use of session, but rather only of starting > a session...all evidence that perhaps this tool never actually ever got > used...??? > > xc > >