aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-06-29 14:57:40 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-06-29 14:57:40 -0700
commit74cec956e80611df621c9d831696e3b59c65e482 (patch)
tree90a476835cc3f2d3909283d09b6f1d1be34e0f72 /activerecord
parente4ad47fac52d4a385e206bd231a696d884736a01 (diff)
parent228aa4fff8d91a179abc81be7891d5a8772257c3 (diff)
downloadrails-74cec956e80611df621c9d831696e3b59c65e482.tar.gz
rails-74cec956e80611df621c9d831696e3b59c65e482.tar.bz2
rails-74cec956e80611df621c9d831696e3b59c65e482.zip
Merge pull request #15977 from sgrif/sg-remove-array-hack
Remove array workaround in PG quoting
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index 5c9e74ba24..f9541b437a 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -27,8 +27,6 @@ module ActiveRecord
else
super
end
- when Array
- super(value, array_column(column))
when Hash
case sql_type
when 'hstore' then super(PostgreSQLColumn.hstore_to_string(value), column)
@@ -81,8 +79,6 @@ module ActiveRecord
else
super
end
- when Array
- super(value, array_column(column))
when Hash
case column.sql_type
when 'hstore' then PostgreSQLColumn.hstore_to_string(value)
@@ -163,26 +159,6 @@ module ActiveRecord
super
end
end
-
- def array_column(column)
- if column.array && !column.respond_to?(:cast_type)
- Column.new('', nil, OID::Array.new(AdapterProxyType.new(column, self)))
- else
- column
- end
- end
-
- class AdapterProxyType < SimpleDelegator # :nodoc:
- def initialize(column, adapter)
- @column = column
- @adapter = adapter
- super(column)
- end
-
- def type_cast_for_database(value)
- @adapter.type_cast(value, @column)
- end
- end
end
end
end