We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 640e398 commit 42fede5Copy full SHA for 42fede5
activerecord/lib/active_record/type_caster/connection.rb
@@ -19,7 +19,7 @@ def type_for_attribute(attr_name)
19
if schema_cache.data_source_exists?(table_name)
20
column = schema_cache.columns_hash(table_name)[attr_name.to_s]
21
if column
22
- type = @klass.lease_connection.lookup_cast_type_from_column(column)
+ type = @klass.with_connection { |connection| connection.lookup_cast_type_from_column(column) }
23
end
24
25
0 commit comments