Posted over 1 year ago. Visible to the public. Linked content.

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:

render 'results', status: 400

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

render 'results', status: :bad_request

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

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Henning Koch
Last edit:
over 1 year 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