Session Data Question

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

AFAIK,

Base64.encode64(Marchal.dump(session))

Kent