Well, I have been reading a lot about this online but I could not solve the problem I face with.
What I want is being able to fetch and store data from multiple DB's from one Rails project. But the problem is, when I create another model for another DB such like user_db_1.rb and user_db_2.rb, when establish_connection method under user_db_2.rb is triggered, all my project starts fetching data from db_2. I want all my models to run on primary database except I set something custom to fetch and save data from db_2.
What is the correct way of implementing this on Ruby on Rails?