diff options
author | Joshua Wehner <joshua.wehner@gmail.com> | 2011-03-03 15:43:42 -0500 |
---|---|---|
committer | Joshua Wehner <joshua.wehner@gmail.com> | 2011-05-10 12:06:09 -0400 |
commit | 2cef2d411a20b89b71fb76876c33b331f94d0cc5 (patch) | |
tree | be87688daa4b431f01e1e05051fa764408341bfc /activemodel/lib/active_model | |
parent | 8e55afb453beb8f98d647ae97619101b19b7f911 (diff) | |
download | rails-2cef2d411a20b89b71fb76876c33b331f94d0cc5.tar.gz rails-2cef2d411a20b89b71fb76876c33b331f94d0cc5.tar.bz2 rails-2cef2d411a20b89b71fb76876c33b331f94d0cc5.zip |
Methods that return nil should not be considered YAML
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/serializers/xml.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/serializers/xml.rb b/activemodel/lib/active_model/serializers/xml.rb index d4295e6afe..19639b1363 100644 --- a/activemodel/lib/active_model/serializers/xml.rb +++ b/activemodel/lib/active_model/serializers/xml.rb @@ -33,6 +33,7 @@ module ActiveModel protected def compute_type + return if value.nil? type = ActiveSupport::XmlMini::TYPE_NAMES[value.class.name] type ||= :string if value.respond_to?(:to_str) type ||= :yaml |