From abab2bf4af7ddd6168e2fe329a67f77d9afab53d Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 4 Jan 2015 06:46:49 +0900 Subject: Stop passing the column to the `quote` method when quoting defaults Related the commit 8f8f8058e58dda20259c1caa61ec92542573643d. --- .../lib/active_record/connection_adapters/postgresql/quoting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb') 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 -- cgit v1.2.3