1 posts in total

Active Record

Posts tagged

Connecting to multiple databases in a Rails app

by Syed Aslam · 1 min read

A traditional Rails application uses a single application. We interact with it by writing models that inherit from `ActiveRecord::Base` which translate connection details (from config/database.yml) via the method `establish_connection`. Let's see how to connect to multiple databases from a Rails app.