aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/column.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-17 11:04:13 -0600
committerSean Griffin <sean@thoughtbot.com>2014-05-17 17:16:05 -0600
commit4bd5dffc85a4f3a660132eb85806a03fa5904e51 (patch)
treeb14a3eecebc85ce6f70a49ee54a466e10912010e /activerecord/lib/active_record/connection_adapters/postgresql/column.rb
parent7359f8190d0ac97db077096796bdc582dffa90d8 (diff)
downloadrails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.gz
rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.bz2
rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.zip
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`.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/column.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/column.rb4
1 files changed, 2 insertions, 2 deletions
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)