diff options
| author | Randy Morgan <[email protected]> | 2012-10-14 08:55:46 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-10-14 08:55:46 +0900 |
| commit | 99ab4e36d3d777943b471d854c0729ba6c040df0 (patch) | |
| tree | 1a068eeca2558adc7379f6af8411b3e3246fdfd2 /lib/axlsx/util/serialized_attributes.rb | |
| parent | fbb4b8455c34e86fb9db541a9ce508beca0de6ac (diff) | |
| download | caxlsx-99ab4e36d3d777943b471d854c0729ba6c040df0.tar.gz caxlsx-99ab4e36d3d777943b471d854c0729ba6c040df0.zip | |
updated serialized_attributes to reject nil values
Diffstat (limited to 'lib/axlsx/util/serialized_attributes.rb')
| -rw-r--r-- | lib/axlsx/util/serialized_attributes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/util/serialized_attributes.rb b/lib/axlsx/util/serialized_attributes.rb index dd67f75b..85a7feba 100644 --- a/lib/axlsx/util/serialized_attributes.rb +++ b/lib/axlsx/util/serialized_attributes.rb @@ -17,7 +17,7 @@ module Axlsx def serialized_attributes(str = '', additional_attributes = {}) key_value_pairs = instance_values.select do |key, value| - self.class.xml_attributes.include?(key.to_sym) + self.class.xml_attributes.include?(key.to_sym) && value != nil end key_value_pairs.merge! additional_attributes key_value_pairs.each do |key, value| |
