Hi Jose,
In theory, the amount you can store in a session is limited only by the
size of a "text" field in the underlying database (usually gigabytes)
if you are using ActiveRecord session storage; or the maximum size of a
file on your filesystem if you are using file storage of sessions.
And yes: you can store ActiveRecord objects in a session.
But in practice, I''ve had Rails throw "stack level too deep"
errors
when I''ve had data in sessions that''s very deeply linked (i.e.
objects
that contain links to other objects, that contain links to others etc.
etc.). I''ve learnt from bitter experience that sometimes it''s
better
to store object IDs in the session and to fetch the objects back again
on the next request.
But as long as you don''t overkill it, you might find it works fine for
you.
-- Urbanus
http://goldberg.240gl.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---