I’m currently using the default cookies as my single sign on (SSO) but some users are getting strange errors after I push an update. I’m considering moving to active record to store sessions but was wondering how I tell rails that the sessions are in another database?
So if I store sessions via AR in App1DB how can all the other apps know thats where to look for sessions?
Rails most certainly does support database session storage.
In config/environment.rb, uncomment
Examining \actionpack-2.2.2\lib\action_controller\session\active_record_store.rb shows that CGI::Session::ActiveRecordStore::Session inherits from ActiveRecord::Base.
So at the end of config/environment.rb, you should be able to say
or
to use a connect defined in config/database.yml
For example, add to config/database.yml:
Add to the end of config/environment.rb