In myapp/config/initializers/session_store.rb , I have the following:
Myapp::Application.config.session_store :cookie_store, :key => '_myapp_session', :domain => :all
The :key option specifies the name for the cookie, and :domain => :all says that the cookie can be used for common subdomains.
Now I want to move on to using ActiveRecord to store the session. If I do this:
Myapp::Application.config.session_store :active_record_store
... although the session is stored in the database, there is still, of course, a cookie. But I no longer control his name or region.
How can I use ActiveRecord storage for a session and still specify a cookie name and domain?
source share