Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PostgreSQLAdapter#query string interpolation calls to_s for us

  • Loading branch information...
commit 8ba14c238e62e5f34846b4f82c5b787e33161511 1 parent 51c9b66
@tenderlove tenderlove authored
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]*$/
Please sign in to comment.
Something went wrong with that request. Please try again.