How To Use Two Databases Into A Single Application?

Technology CommunityCategory: Ruby on RailsHow To Use Two Databases Into A Single Application?
VietMX Staff asked 3 years ago

magic multi-connections allows you to write your model once, and use them for the multiple rails databases at the same time.

sudo gem install magic_multi_connection 

After installing this gem, just add this line at bottom of your environment.rb require “magic_multi_connection”