diff options
author | Kirill Lashuk <kirill.lashuk@gmail.com> | 2012-01-28 05:10:13 +0300 |
---|---|---|
committer | Kirill Lashuk <kirill.lashuk@gmail.com> | 2012-01-31 22:07:09 +0300 |
commit | 39cb1bedb82814d7bf9de6834f88c31e4df27278 (patch) | |
tree | 13b6ab68dc6549281dfeb059a1ab5d9f368cd005 /activerecord/lib/active_record/coders | |
parent | d6e41f364a73fb0378dc29d63c15ef7c18b8e18e (diff) | |
download | rails-39cb1bedb82814d7bf9de6834f88c31e4df27278.tar.gz rails-39cb1bedb82814d7bf9de6834f88c31e4df27278.tar.bz2 rails-39cb1bedb82814d7bf9de6834f88c31e4df27278.zip |
Do not serialize nil in serialized attribute.
Diffstat (limited to 'activerecord/lib/active_record/coders')
-rw-r--r-- | activerecord/lib/active_record/coders/yaml_column.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/coders/yaml_column.rb b/activerecord/lib/active_record/coders/yaml_column.rb index fb59d9fb07..77af540c3e 100644 --- a/activerecord/lib/active_record/coders/yaml_column.rb +++ b/activerecord/lib/active_record/coders/yaml_column.rb @@ -15,7 +15,7 @@ module ActiveRecord end def dump(obj) - YAML.dump obj + YAML.dump(obj) unless obj.nil? end def load(yaml) |