Sha256: e39e7998aae47afce91e4cec714f1bbc39fa588302c4c7b31e6ba7d77e286389
Contents?: true
Size: 646 Bytes
Versions: 4
Compression:
Stored size: 646 Bytes
Contents
class ActiveRecord::Base class << self def establish_connection_with_activerecord_import(*args) establish_connection_without_activerecord_import(*args) ActiveSupport.run_load_hooks(:active_record_connection_established, connection_pool) end alias_method_chain :establish_connection, :activerecord_import end end ActiveSupport.on_load(:active_record_connection_established) do |connection_pool| if !ActiveRecord.const_defined?(:Import) || !ActiveRecord::Import.respond_to?(:load_from_connection_pool) require "activerecord-import/base" end ActiveRecord::Import.load_from_connection_pool connection_pool end
Version data entries
4 entries across 4 versions & 1 rubygems