On May 3, 7:24 pm, djolley <[email protected]> wrote:
> > You're running a different rails version (2.2.2 or less), whereas the
> > others must be using 2.3.2 (session handling got a revamp).
>
> Two things:
>
> 1.  Under the revamp is 'session' a real hash?
>
it's a special hash (because there's crafty stuff to do with lazy
loading)

> 2.  From my code you probably saw what I was trying to do.
> Specifically, I was attempting to use the fetch method to test whether
> a specific key was in the session hash and return nil if it wasn't.
> I'm wondering what the best way to do this is knowing what's coming
> down the pike.  Maybe (and it scares me to even think about this) I
> could somehow add a fetch method to the quasi session hash.  Then my
> code would be compatible with what's coming in the later version.  I'm
> pretty darn sure that I'm not smart enough to do that; but, it's
> something to think about.  Any suggestions on how I should handle
> this?  Thanks.

Is
if session[:foo]
 ...

not good enough for you (or do you sometimes explicitly store nil in
the session (and want that to be distinct from the value not being
there at all) ?) ?

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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to