So i\'d like to be able to add an external database to my config/database.yml Then model one table from it.
config/database.yml
Is this possible? I haven\'t been able to
First, define the connection information in database.yml:
my_external_db: adapter: mysql username: ... ....
Then, create the model and connect it to the external db
class MyExternalModel < ActiveRecord::Base establish_connection(:my_external_db) set_table_name 'my_external_table' end