I want my application to authenticate user through master database and
accordingly should connect them to their specific database.
I am using the sub-domain as identifier for the user and stores
domain-database information in master database.
Im using a function responsible for mapping domains to database in
application.rb using before_filter :function_call
Default database will be master and function will identify the user
specify db to establish a connection at runtime.
The problem is ..the next time i tries to logout and use different
domain.. it still uses previous database and tries to find
domain-database related information there, which actually is in masters.
Plz suggest me some way to it.
Thanks in Advance