it's a bad idea to store actual objects in the session - just store an
ID if possible.


On Nov 13, 4:56 pm, Shandy Nantz <[EMAIL PROTECTED]>
wrote:
> Clem Rock wrote:
> > How would I isolate just the session_id or is there really such a
> > session_id that doesn't change state w/ each action of a user session?
>
> > Jeff Emminger wrote:
> >> Rails 2 uses cookie based sessions by default.  You're looking at
> >> everything you've stored in your session.
>
> >> On Nov 13, 2:48 pm, Clem Rock <[EMAIL PROTECTED]>
>
> Are you stroing an entire object in that session or just the id? I
> recently switched from rails 1.2.x to 2.0 and found that session data is
> handled differently between the two version. In rails 1.2.X. I could
> store an entire object but in 2.0 I can store only a limited amount of
> data in the session variable and one indication that you are storing an
> object is that large hash that you see in your example. I solved this
> problem by create several session variables that hold only id's - an id
> for a normal user, one for an administrator, etc.
>
> Hope this helps,
>
> -S
> --
> Posted viahttp://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 [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