aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 00:00:22 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 00:00:22 -0300
commite54d275023023347a325801fa25c18ac410a18ea (patch)
treee2facb789fb2907e933352e894367645b3157bba /activerecord
parent5777f0bff99b1c887626c84ef6124adfa5f14645 (diff)
parentabab2bf4af7ddd6168e2fe329a67f77d9afab53d (diff)
downloadrails-e54d275023023347a325801fa25c18ac410a18ea.tar.gz
rails-e54d275023023347a325801fa25c18ac410a18ea.tar.bz2
rails-e54d275023023347a325801fa25c18ac410a18ea.zip
Merge pull request #18318 from kamipo/stop_passing_the_column_when_quoting_defaults
Stop passing the column to the `quote` method when quoting defaults
Diffstat (limited to 'activerecord')
-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