TIL in rails how to check which database a model is connected to from rails console
by @rinas
ActiveRecord::Base.connection_db_config.name
Car.connection_db_config.name Vehicle.connection_db_config.name
This is useful in scenarios where we have models connecting to different database and want to check them via rails console