Reputation: 11212
I have this in session_store.rb
Trunk::Application.config.session_store :active_record_store, :key => '_eg2_session_id', :domain => domain
And I ran the session migration. The session table is there and records are getting created in it, however cookies are also getting created. Any idea why?
Upvotes: 0
Views: 673
Reputation: 18193
The cookie is still required to map the user visiting the site to the session in the database. What you're changing when you change the session_store
is where the data is stored.
So, the way you have things set up, this is roughly what happens:
user_id => 5
in the session, and that's added to the databaseWhen you use cookie store, here's what happens:
user_id => 5
in the session, and that's added to the cookieIn both cases, a cookie is created to associate the visitor with the session, it's just that the data in the session is stored in a different place.
Upvotes: 1