Skip to content
Browse files

PostgreSQLAdapter#query string interpolation calls to_s for us

  • Loading branch information...
1 parent 51c9b66 commit 8ba14c238e62e5f34846b4f82c5b787e33161511 @tenderlove tenderlove committed Jul 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -319,7 +319,7 @@ def quote(value, column = nil) #:nodoc:
"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]*$/

0 comments on commit 8ba14c2

Please sign in to comment.
Something went wrong with that request. Please try again.