ruby - How to store the flash in a different cookie to the Rails session? -
we have rails session cookie set visible on subdomain issued (i.e. setting domain: nil
in session store configuration). means there separate user sessions per subdomain, want.
however, still flash messages visible across subdomains. if log out on foo.oursite.com , redirected www.oursite.com, should see "logged out successfully" message flash, despite being different subdomains.
so question is: can configure rails flash system use separate cookie session store, can set domain: :all
cookie , have flash visible across subdomains?
(we on rails 5.0)
you e
yourapp::application.config.session_store :cookie_store, key: '_yourapp_session', :domain => :all
but mean cookies accessible across sub-domains , share logged in session cookie.
you maybe want storing alerts in database , retrieve them needed.
Comments
Post a Comment