aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
diff options
context:
space:
mode:
authorRyan Oblak <rroblak@gmail.com>2012-03-09 16:33:40 -0800
committerRyan Oblak <rroblak@gmail.com>2012-03-09 16:33:40 -0800
commit12c44fe7f566990923fd0814acaa76b83309c832 (patch)
tree7123c5d6ec2b57440f0eb199b836bd192dc36e27 /activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
parentfcef72890b7f8b974ee490268a48e147bd621253 (diff)
downloadrails-12c44fe7f566990923fd0814acaa76b83309c832.tar.gz
rails-12c44fe7f566990923fd0814acaa76b83309c832.tar.bz2
rails-12c44fe7f566990923fd0814acaa76b83309c832.zip
Fixed bug in Quoting that caused classes to be quoted incorrectly
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/quoting.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
index 44ac37c498..6f9f0399db 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -34,6 +34,7 @@ module ActiveRecord
when Numeric then value.to_s
when Date, Time then "'#{quoted_date(value)}'"
when Symbol then "'#{quote_string(value.to_s)}'"
+ when Class then "'#{value.to_s}'"
else
"'#{quote_string(YAML.dump(value))}'"
end