From 4bd5dffc85a4f3a660132eb85806a03fa5904e51 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Sat, 17 May 2014 11:04:13 -0600 Subject: Add a type object to Column constructor Part of #15134. In order to perform typecasting polymorphically, we need to add another argument to the constructor. The order was chosen to match the `oid_type` on `PostgreSQLColumn`. --- .../lib/active_record/connection_adapters/postgresql/column.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/column.rb') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb index 97a93ce87a..77fdebbbc9 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb @@ -12,10 +12,10 @@ module ActiveRecord if sql_type =~ /\[\]$/ @array = true - super(name, default_value, sql_type[0..sql_type.length - 3], null) + super(name, default_value, oid_type, sql_type[0..sql_type.length - 3], null) else @array = false - super(name, default_value, sql_type, null) + super(name, default_value, oid_type, sql_type, null) end @default_function = default if has_default_function?(default_value, default) -- cgit v1.2.3