From 27ba5edef1c4264a8d1c0e54675723d37a391dd8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 18 Mar 2007 07:30:09 +0000 Subject: Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support serialized attributes. Closes #7502. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/xml_serialization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/xml_serialization.rb b/activerecord/lib/active_record/xml_serialization.rb index 7a8167534d..ff7720d786 100644 --- a/activerecord/lib/active_record/xml_serialization.rb +++ b/activerecord/lib/active_record/xml_serialization.rb @@ -275,7 +275,7 @@ module ActiveRecord #:nodoc: protected def compute_type - type = @record.class.columns_hash[name].type + type = @record.class.serialized_attributes.has_key?(name) ? :yaml : @record.class.columns_hash[name].type case type when :text -- cgit v1.2.3