Skip to content

Commit

Permalink
Clarify arguments of head method
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase DuBois committed Apr 14, 2013
1 parent be1af1b commit 1ed40d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/layouts_and_rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ This would detect that there are no books with the specified ID, populate the `@

### Using `head` To Build Header-Only Responses

The `head` method can be used to send responses with only headers to the browser. It provides a more obvious alternative to calling `render :nothing`. The `head` method takes one parameter, which is interpreted as a hash of header names and values. For example, you can return only an error header:
The `head` method can be used to send responses with only headers to the browser. It provides a more obvious alternative to calling `render :nothing`. The `head` method accepts a number or symbol (see [reference table](#the-status-option)) representing a HTTP status code. The options argument is interpreted as a hash of header names and values. For example, you can return only an error header:

```ruby
head :bad_request
Expand Down

0 comments on commit 1ed40d7

Please sign in to comment.