Skip to content

Commit 4ab7470

Browse files
committed
Postgres, fix loading some types
1 parent f1bab6a commit 4ab7470

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/arjdbc/postgresql/base/array_encoder.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def initialize(name:, delimiter:)
1212
'text'.freeze
1313
else
1414
base_type = name.chomp('[]').to_sym
15-
ActiveRecord::Base.connection.native_database_types[base_type][:name]
15+
ActiveRecord::Base.with_connection do |connection|
16+
connection.native_database_types[base_type][:name]
17+
end
1618
end
1719
end
1820

0 commit comments

Comments
 (0)