RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: Malet
class ActiveRecord::Base mattr_accessor :shared_connection @@shared_connection = {} def self.connection @@shared_connection[self.connection_config[:database]] ||= retrieve_connection end end
This is a modified version I've used for projects that have multiple connections
This is a modified version I've used for projects that have multiple connections