Skip to content

Conversation

@timriley
Copy link
Member

@timriley timriley commented Oct 11, 2025

Update the "Formats and MIME types" docs to use the new config API we're introducing in hanami/hanami-controller#485

Also add the beginnings for a 2.3 upgrade guide, covering the action format changes.

This was accidentally changed in a mass find/replace of “2.2” to “2.3” when we created the 2.3 guides.
Copy link
Contributor

@katafrakt katafrakt left a comment

Choose a reason for hiding this comment

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

few minor nitpicks

module Books
class Index < Bookshelf::Action
config.default_charset "koi8-r"
config.default_charset = koi8-r"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
config.default_charset = koi8-r"
config.default_charset = "koi8-r"

missing quote

Comment on lines +38 to +39
You can also accept formats on any individual action class. `config.formats` in an action class is
analogous to `config.actions.formats` in your app class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a random thought, but maybe "works the same way as" is more precise than "is analogous to", which suggests similarity with differences (at least to this non-native English speaker)

## Request acceptance

Once you've configured a format, your actions will reject certain requests that do not match the format.
Once your actions accept a format, they will reject requests that do not match the format.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not exactly related to this PR, but maybe it's worth to write a little more what rejection means in this context, i.e. what status will be returned (an which view rendered?)

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.

3 participants