I have a rails 3.2.8 application that users are developing for users_sessions. Previously, it had a config/initializers/session_store.rb file, which looked like this:
AppName::Application.config.session_store :active_record_store
The application started for some time, and users visited the site and registered. Then I changed session_store.rb
to
AppName::Application.config.session_store :active_record_store, domain: '.app_name.com'
so that the session is saved in subdomains. The problem I discovered was that users who had previously visited the site and signed up could no longer until they cleared their cookies. How can I allow previous users to log in without requiring them to clear their cookies and allow their session to be stored in subdomains?
source share