aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-14 15:18:48 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-14 15:18:48 -0700
commit8ba14c238e62e5f34846b4f82c5b787e33161511 (patch)
tree4607ccc0bd3242c2de16a555360ba3ff35a470c6 /activerecord/lib
parent51c9b666e634e2d9551410cbc393bfd83bba7856 (diff)
downloadrails-8ba14c238e62e5f34846b4f82c5b787e33161511.tar.gz
rails-8ba14c238e62e5f34846b4f82c5b787e33161511.tar.bz2
rails-8ba14c238e62e5f34846b4f82c5b787e33161511.zip
PostgreSQLAdapter#query string interpolation calls to_s for us
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb2
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]*$/