Sha256: 760daedc79d6121b778fcbea12c92b7a697dc8320c224004e8b018d5976f8c88

Contents?: true

Size: 817 Bytes

Versions: 7

Compression:

Stored size: 817 Bytes

Contents

require "pathname"
require "active_record"
require "active_record/version"

module ActiveRecord::Import
  AdapterPath = File.join File.expand_path(File.dirname(__FILE__)), "/active_record/adapters"

  # Loads the import functionality for a specific database adapter
  def self.require_adapter(adapter)
    require File.join(AdapterPath,"/abstract_adapter")
    require File.join(AdapterPath,"/#{adapter}_adapter")
  end

  # Loads the import functionality for the passed in ActiveRecord connection
  def self.load_from_connection_pool(connection_pool)
    require_adapter connection_pool.spec.config[:adapter]
  end
end


this_dir = Pathname.new File.dirname(__FILE__)
require this_dir.join("import").to_s
require this_dir.join("active_record/adapters/abstract_adapter").to_s
require this_dir.join("synchronize").to_s

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
activerecord-import-in4systems-0.2.13 lib/activerecord-import/base.rb
activerecord-import-in4systems-0.2.12 lib/activerecord-import/base.rb
activerecord-import-in4systems-0.2.11 lib/activerecord-import/base.rb
activerecord-import-in4systems-0.2.10 lib/activerecord-import/base.rb
activerecord-import-0.2.11 lib/activerecord-import/base.rb
activerecord-import-0.2.10 lib/activerecord-import/base.rb
activerecord-import-0.2.9 lib/activerecord-import/base.rb