Skip to content

Instantly share code, notes, and snippets.

@sbusso
Created March 26, 2010 07:46
Show Gist options
  • Save sbusso/344645 to your computer and use it in GitHub Desktop.
Save sbusso/344645 to your computer and use it in GitHub Desktop.
new_object = OtherDatabase::NewClass1.new
...
result = OtherDatabase::NewClass1.find(:all)
other_database_connection:
adapter: postgresql
encoding: utf8
database: database_name
username: user
password: password
host: localhost
class External < ActiveRecord::Base
self.abstract_class = true
establish_connection :other_database_connection
end
class OtherDatabase::NewClass1 < External
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment