need clarification on session

hi

running a working rails3 + devise app. once i sign in, i store the session id in the db. then when i go back to the index view, the id is different. how can that be? im always using: controller request.session_options[:id]

view: <%= logger.info session.inspect %> <hr> <%= request.session_options[:id] %> <br> <%= session['session_id'] %>

could some pls helpme? thx

hi

running a working rails3 + devise app. once i sign in, i store the session id in the db. then when i go back to the index view, the id is different. how can that be? im always using:

What session store are you using? If you are using the cookie store (this is the default) then this is normal - for this store the session cookie isn't the id of a database row, memcache key etc, but the actual contents of the session

Fred

hi frederick yes im using cookistore.mayb i've expressed myself wrong. lets say im on my landing page, refresh and print out the sessiond: cd97142191ba68518a5f36d15d63299d

then i do a login plus store the session immedialty into the db and get redirected to the indexview which now shows: 1d1b8ccd73d99c218fc3e07fd19dc452

in the db i have: 472aa86f3bcb9a77b54889e94956b448

so something i dont really get here. i need a reference for a non-rails app...thats why the cookie and the overhead with addtionally storing it/

what im i not seing here?

thx

crap, i copied the wrong one: the sessionvalue in teh db is the one from prior the login im doing the db-store in the after_signed_in hook of devise thx