aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-18 07:30:09 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-18 07:30:09 +0000
commit27ba5edef1c4264a8d1c0e54675723d37a391dd8 (patch)
tree83e5292708b2452b26d92f4a95dd6094f298c64e /activerecord/lib/active_record
parent3202fbabe6df3591d7e2c35727ea9c8b68df8828 (diff)
downloadrails-27ba5edef1c4264a8d1c0e54675723d37a391dd8.tar.gz
rails-27ba5edef1c4264a8d1c0e54675723d37a391dd8.tar.bz2
rails-27ba5edef1c4264a8d1c0e54675723d37a391dd8.zip
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
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/xml_serialization.rb2
1 files changed, 1 insertions, 1 deletions
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