aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2015-01-04 06:46:49 +0900
committerRyuta Kamizono <kamipo@gmail.com>2015-01-04 06:46:49 +0900
commitabab2bf4af7ddd6168e2fe329a67f77d9afab53d (patch)
treefc5b0e57574a7800242d4fd5a33b0939f9913a58 /activerecord/lib/active_record/connection_adapters
parent4591b0fc041454f4ba4a83629b9bbca2a851969c (diff)
downloadrails-abab2bf4af7ddd6168e2fe329a67f77d9afab53d.tar.gz
rails-abab2bf4af7ddd6168e2fe329a67f77d9afab53d.tar.bz2
rails-abab2bf4af7ddd6168e2fe329a67f77d9afab53d.zip
Stop passing the column to the `quote` method when quoting defaults
Related the commit 8f8f8058e58dda20259c1caa61ec92542573643d.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index 607848884b..9de9e2c7dc 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -56,7 +56,8 @@ module ActiveRecord
if column.type == :uuid && value =~ /\(\)/
value
else
- quote(value, column)
+ value = column.cast_type.type_cast_for_database(value)
+ quote(value)
end
end