Skip to content

Instantly share code, notes, and snippets.

@exu
Created December 16, 2011 07:59
Show Gist options
  • Save exu/1485028 to your computer and use it in GitHub Desktop.
Save exu/1485028 to your computer and use it in GitHub Desktop.
howto establish multiple connection
class Makes < ActiveRecord::Base
self.establish_connection "crm_#{ENV['RAILS_ENV']}"
set_table_name 'objects.edp_makes_view'
set_primary_key :make_id
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment