Sha256: 787172d829bcd41cdf0fb7ebdde73a93984d7708928375fc78db10e961912f13

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

if defined?(ActiveRecord::Import)
  ActiveRecord::Import.module_eval do
    class << self # Lulz, I tried `module << self` which didn't work.
      # Catch case where adapter is set to <tt>:nogo</tt>.  Activerecord-import hijacks 
      # AR::Base#establish_connection, so there was no clean way to avoid having it attempt
      # to require its own nogo adatper, which fails.
      def require_adapter_with_nogo(adapter)
        require_adapter_without_nogo(adapter) unless adapter==:nogo
      end
      alias_method_chain :require_adapter, :nogo
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nogo-1.0.0.beta lib/active_record/import.rb