I use multible databases with ActiveRecord. I must put establish_connection db
in all models. But i want to call the connection of libraries file. While put establish_connection db
in for all models Database connection count is too much . How can I do other methods?
My project is a Ruby on Sinatra.