From 920070e42b33c5bdaf62977ed22aa867a455ffd5 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Thu, 19 Jan 2012 11:12:21 -0800 Subject: Don't type-cast unknown types to YAML. --- activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index f93c7cd74a..8cc7c50020 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -71,7 +71,7 @@ module ActiveRecord when Date, Time then quoted_date(value) when Symbol then value.to_s else - YAML.dump(value) + raise TypeError, "can't cast #{value.class} to #{column.type}" end end -- cgit v1.2.3