diff options
Diffstat (limited to 'activerecord/lib/active_record/serializers')
-rw-r--r-- | activerecord/lib/active_record/serializers/xml_serializer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/serializers/xml_serializer.rb b/activerecord/lib/active_record/serializers/xml_serializer.rb index 28e9b3ddc6..693060f06e 100644 --- a/activerecord/lib/active_record/serializers/xml_serializer.rb +++ b/activerecord/lib/active_record/serializers/xml_serializer.rb @@ -271,6 +271,10 @@ module ActiveRecord #:nodoc: decorations[:type] = type end + if value.nil? + decorations[:nil] = true + end + decorations end |