diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-14 15:18:48 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-14 15:18:48 -0700 |
commit | 8ba14c238e62e5f34846b4f82c5b787e33161511 (patch) | |
tree | 4607ccc0bd3242c2de16a555360ba3ff35a470c6 /activerecord/lib/active_record/connection_adapters | |
parent | 51c9b666e634e2d9551410cbc393bfd83bba7856 (diff) | |
download | rails-8ba14c238e62e5f34846b4f82c5b787e33161511.tar.gz rails-8ba14c238e62e5f34846b4f82c5b787e33161511.tar.bz2 rails-8ba14c238e62e5f34846b4f82c5b787e33161511.zip |
PostgreSQLAdapter#query string interpolation calls to_s for us
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index cf0dc64d2b..121785bc15 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -319,7 +319,7 @@ module ActiveRecord "xml '#{quote_string(value)}'" elsif value.kind_of?(Numeric) && column.sql_type == 'money' # Not truly string input, so doesn't require (or allow) escape string syntax. - "'#{value.to_s}'" + "'#{value}'" elsif value.kind_of?(String) && column.sql_type =~ /^bit/ case value when /^[01]*$/ |