module ActiveRecord::Import
def self.load_from_connection(connection)
def self.load_from_connection(connection) import_adapter = "ActiveRecord::Import::#{connection.class.name.demodulize}::InstanceMethods" unless connection.class.ancestors.map(&:name).include?(import_adapter) config = connection.instance_variable_get :@config require_adapter config[:adapter] end end
def self.require_adapter(adapter)
def self.require_adapter(adapter) require File.join(AdapterPath,"/abstract_adapter") require File.join(AdapterPath,"/#{adapter}_adapter") end