From 5352a8c118c256b8099389b2d540eb4be8956fd8 Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sun, 30 Aug 2026 08:54:13 +0200 Subject: [PATCH] Preserve nested options in namespace rendering --- lib/representable/xml/namespace.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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|