Forum: Ruby on Rails Session Data Question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
11bd67aedc131020a51440fad59116cc?d=identicon&s=25 Andrew Filipowski (Guest)
on 2006-02-17 13:51
(Received via mailing list)
I am still to new to rails to feel comfortable diving into the source
for the framework however my comfort is getting better. My question
is this. We are storing the session data in the database using
active_record_store. I was looking at the table to just get a better
idea of what is going on as far as how the data is stored. I am a bit
curious as to the session.data field. What method is rails using to
create that string? and how is it pulling the data out of the string
when you call something like session[:user] where :user is the user.id?

Thanks for any response. I am more curious than anything the session
stuff seems like magic to me and just curious on learning more about
that magic.

andrew
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-02-17 14:52
(Received via mailing list)
AFAIK,

Base64.encode64(Marchal.dump(session))

Kent
---
http://www.datanoise.com
This topic is locked and can not be replied to.