lib/pg_csv.rb in pg_csv-0.1.10 vs lib/pg_csv.rb in pg_csv-0.2
- old
+ new
@@ -1,6 +1,6 @@
-require 'active_record'
+require 'pg'
require File.expand_path(File.join(File.dirname(__FILE__), 'pg_csv/version'))
class PgCsv
module Base
@@ -95,10 +95,10 @@
end
end
def load_data
info "#{query}"
- raw = connection.raw_connection
+ raw = connection.respond_to?(:raw_connection) ? connection.raw_connection : connection
count = 0
info "=> query"
raw.copy_data(query) do
info "<= query"