diff --git a/lib/representable/xml/namespace.rb b/lib/representable/xml/namespace.rb index c04ecb1d..d0b5bd2a 100644 --- a/lib/representable/xml/namespace.rb +++ b/lib/representable/xml/namespace.rb @@ -92,7 +92,8 @@ def to_node(options={}) # TODO: there should be an easier way to pass a set of options to all nested #to_node decorators. representable_attrs.keys.each do |property| - options[property.to_sym] = { show_definition: false, namespaces: options[:namespaces] } + nested_options = options[property.to_sym] || {} + options[property.to_sym] = nested_options.merge(show_definition: false, namespaces: options[:namespaces]) end super(options).tap do |node|