Skip to content

Conversation

@seanpdoyle
Copy link
Contributor

Prior to this commit, the documentation for setting a custom Format was inconsistently mixing module-level and instance-level method definitions.

There isn't existing precedent in the documentation for how to declare custom formats that share behavior with first-party formats (like xml and json). Since the test suite utilizes a class-based approach (rather than a module-based one), change the Base documentation to follow that precedent.

Prior to this commit, the documentation for setting a custom Format was
inconsistently mixing module-level and instance-level method
definitions.

There isn't existing precedent in the documentation for how to declare
custom formats that share behavior with first-party formats (like xml
and json). Since the [test suite][] utilizes a `class`-based approach
(rather than a `module`-based one), change the `Base` documentation to
follow that precedent.

[test suite]: https://github.com/rails/activeresource/blob/v6.2.0/test/fixtures/address.rb#L4-L15
@rafaelfranca rafaelfranca merged commit c6e9206 into rails:main Oct 22, 2025
19 checks passed
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