views:

367

answers:

1

There's a great answer for my question over here http://stackoverflow.com/questions/378376/rails-shared-sessions-with-activerecord but it has to do with rails 2.2.2. The method used has been deprecated in 2.3.2.

Does anyone know how to use an external database for session data in rails 2.3.2? The overall goal is session sharing between two apps using two different databases. thanks!

+1  A: 

Alright, found what I need. Not tested 100% to make sure it's working, but it doesn't spawn errors anymore.

CGI::Session::ActiveRecordStore has been replaced in rails 2.3.2 with ActiveRecord::SessionStore

So the new method to connect to an external db SHOULD be ActiveRecord::SessionStore::Session.establish_connection(:connection_name)

Ryan