I have an application that let the user to connect in multiples environments. Depending of the choice of environment that the user pick, activerecord will use Database X or Y.
But when I use ActiveRecord::Base.establish_connection, activerecord change the database for all users. I want that user 'A' use Database 'X' and user 'B' use Database 'Y' at the same time in one single application. Is that possible with rails?