Here is a problem which is quite mysterious to me,
I am having multiple database architecture, each user logs in with
organisation name/user name/password
There is a master database and a table 'names' which contains the
names
of the database corresponding to each organisation nameI am using
ActiveRecord::Base.connection.execute('USE '+name_from
_master_db_table+'')to dynamically switch the database, also i am using
act_as_authenticated
plugin to login the usersNow the issue is that i need to login twice to enter, also if i
login in
a different browser with a different org name(which connects to a
different db ) the page in the initial browser gets logged out, All
these used to work fine when the session store was cookie based , now
that i have changed to active_record store, I am facing these issues,
any idea or suggestion on this would be helpful a lot.
well when you switch the database like that you're probably leaving it
switched, so when the next request is handled it's trying to get the
session from the wrong database.
Fred