Posted 6 months ago. Visible to the public.

List of :status symbols for rendering in Rails

When your Rails controller calls render, you can pass a :status option for the HTTP status code:

Copy
render 'results', status: 400

All important status codes also have a symbol alias, which makes your code easier to read:

Copy
render 'results', status: :bad_request

Attached is a list of available symbol values for :status.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Henning Koch
Last edit:
6 months ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more