Skip to content

Conversation

@mvz
Copy link
Owner

@mvz mvz commented Nov 1, 2025

This makes setting the :namespace option to nil on child elements clear the namespace for parsing and rendering. Before, the effect was ambiguous, clearing the namespace when parsing scalars, but not having any effect when rendering, or when parsing models.

This fixes #43.

  • Allow explicitly blocking namespace prefixes on scalar child elements
  • Clean up comments in HappyMapper module
  • Allow explicitly blocking namespace prefixes on model child elements
  • Regenerate RuboCop to-do file

mvz added 4 commits October 31, 2025 17:15
Setting namespace to nil on a child element was equivalent to not
setting it, as far as #to_xml was concerned. This commit changes that
and clears the namespace on the generated element.

This fixes #43.
Setting namespace to nil on a model child element was equivalent to not
setting it, both for reading and writing. This commit changes that
by using an empty namespace when searching for nodes to parse, and by
the namespace on the generated element.

Part of #43.
@mvz mvz force-pushed the nil-namespace-on-association branch from 12f9c77 to 5142941 Compare November 1, 2025 11:41
@mvz mvz enabled auto-merge November 1, 2025 11:42
@mvz mvz merged commit 82e6887 into master Nov 1, 2025
7 checks passed
@mvz mvz deleted the nil-namespace-on-association branch November 1, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#to_xml: Child element with removed namespace will still have parent namespace

1 participant