instance method
message
Ruby on Rails 6.0.6
Since v3.0.20Signature
message()
Returns the corresponding message for the current HTTP status code:
response.status = 200 response.message # => "OK" response.status = 404 response.message # => "Not Found"
Source
# File actionpack/lib/action_dispatch/http/response.rb, line 309
def message
Rack::Utils::HTTP_STATUS_CODES[@status]
end
Defined in actionpack/lib/action_dispatch/http/response.rb line 309
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Response