diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb index 18ea83ce42..02c295983f 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb @@ -82,7 +82,7 @@ module ActiveRecord def type_cast(value) return if value.nil? - value.to_i rescue value ? 1 : 0 + ConnectionAdapters::Column.value_to_integer value end end @@ -276,6 +276,7 @@ module ActiveRecord register_type 'circle', OID::Identity.new register_type 'hstore', OID::Hstore.new register_type 'json', OID::Json.new + register_type 'ltree', OID::Identity.new register_type 'int4range', OID::IntRange.new alias_type 'int8range', 'int4range' |