Skip to content

Conversation

@seanpdoyle
Copy link
Contributor

Related to #361

Add special-case treatment of JSON and XML acronyms by declaring aliases for the JsonFormat and XmlFormat constants.

In addition to the aliases, this commit also includes test coverage to cover existing behavior.

The original PR included a comment citing that
ActiveSupport::Inflector::Inflections#clear was not working as expected. It was resolved by a76344f, which was merged into main prior to the 7.0.0 release. Since the CI matrix currently includes 7-0-stable as the minimum version, the code can rely on the resolved behavior.

@rafaelfranca
Copy link
Member

Instead of adding aliases, I think we should just stop using the inflector

Copy link
Member

@rafaelfranca rafaelfranca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment above

Related to rails#361

Add special-case treatment of JSON and XML acronyms by making direct
references to the `JsonFormat` and `XmlFormat` constants, rather than
relying on inflections.

The original PR included a comment citing that
`ActiveSupport::Inflector::Inflections#clear` was not working as
expected. It was resolved by [a76344f][], which was merged into `main`
prior to the `7.0.0` release. Since the CI matrix currently includes
`7-0-stable` as the minimum version, the code can rely on the resolved
behavior.

[a76344f]: rails/rails@a76344f
@rafaelfranca rafaelfranca merged commit f21d50a into rails:main Sep 11, 2025
19 checks passed
@seanpdoyle seanpdoyle deleted the acronym-support branch September 11, 2025 16:21
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.

2 participants