I am have a application where the user can chose the database which they to access. I have to authenticate the user which the database they have chosen and i have to keep the transaction with thr user and the database till the user logs out.
I was able to do it by establish_connection and passing the database name requested by the user. But i hit a roadblock.The issue is,
Lets assume user1 requested to access the databaseA and the user has got the access not logged out,If user2 requests to access databaseB , In that case even the user1's requests are hitting to DatabaseB
I am aware that Devise can solve this problem, I am not able to figure it out how.
Any suggestions would be really helpful