-
Notifications
You must be signed in to change notification settings - Fork 96
Update action format docs for new 2.3 API #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This was accidentally changed in a mass find/replace of “2.2” to “2.3” when we created the 2.3 guides.
katafrakt
left a comment
There was a problem hiding this 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| config.default_charset = koi8-r" | |
| config.default_charset = "koi8-r" |
missing quote
| 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?)
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.