In our program, each customer gets their own database. We e-mail them a link that connects them to their database. The link contains a GUID that lets the program know whic
It's been a while since this question has been created, but I have to say that there is another way too:
conn_config = ActiveRecord::Base.connection_config conn_config[:database] = new_database ActiveRecord::Base.establish_connection conn_config