method
head
Ruby on Rails latest stable (v3.2.13)
-
0 notes -
Class: ActionController::Head
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0 (0)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-21)
- 3.1.0 (0)
- 3.2.1 (38)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
head(status, options = {})
public
Return a response that has no content (merely headers). The options argument is interpreted to be a hash of header names and values. This allows you to easily return a response that consists only of significant headers:
head :created, :location => person_path(@person) head :created, :location => @person
It can also be used to return exceptional conditions:
return head(:method_not_allowed) unless request.post? return head(:bad_request) unless valid_request? render


