You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixes bug rails#23142.
- Bug was occurring only with ActionController::API, because `_process_options` wasn't being run for API requests, even though it was being run for normal app requests.
Sample repo: https://github.com/bbonamin/render-content-type-status-api
(app generated with
rails new --api
)In https://github.com/bbonamin/render-content-type-status-api/blob/master/app/controllers/status_controller.rb
render json: {what: 'oops!'}, status: 500
Renders with 500 Internal Server Error √
render plain: 'oops!', status: 500
Renders with status 200 OK (500 is expected)
This also happens with
render text: 'foo', status: 500
An app created without
--api
works as expected, I suspect this behavior might be coming from somewhere related toActionController::API
Thanks 😄
The text was updated successfully, but these errors were encountered: