diff options
author | Xavier Noria <fxn@hashref.com> | 2013-01-26 17:36:38 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-01-26 17:36:38 +0100 |
commit | 4313461587254fd8e5b5a8ea7dfc9f0230c70ecb (patch) | |
tree | f9bb2ba09b9484c7ab701d6d13b88af7874eb297 /actionpack/lib/action_dispatch | |
parent | 4e5a4cf4b2b52815bcba8fcd4bab52fe5a8f161b (diff) | |
download | rails-4313461587254fd8e5b5a8ea7dfc9f0230c70ecb.tar.gz rails-4313461587254fd8e5b5a8ea7dfc9f0230c70ecb.tar.bz2 rails-4313461587254fd8e5b5a8ea7dfc9f0230c70ecb.zip |
generic pass before merging docrails
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 845fa2ec1f..e7e8905d7e 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -137,7 +137,7 @@ module ActionDispatch # :nodoc: @committed end - # Allows you to set the HTTP status code + # Sets the HTTP status code. def status=(status) @status = Rack::Utils.status_code(status) end @@ -146,22 +146,24 @@ module ActionDispatch # :nodoc: @content_type = content_type.to_s end - # The response code of the request + # The response code of the request. def response_code @status end - # Returns a String to ensure compatibility with Net::HTTPResponse + # Returns a string to ensure compatibility with <tt>Net::HTTPResponse</tt>. def code @status.to_s end - # Returns the corresponding message for the current HTTP status code + # Returns the corresponding message for the current HTTP status code: + # # response.status = 200 # response.message # => "OK" # # response.status = 404 # response.message # => "Not Found" + # def message Rack::Utils::HTTP_STATUS_CODES[@status] end @@ -179,7 +181,7 @@ module ActionDispatch # :nodoc: stream.to_path end - # Returns the content of the response as a String. This contains the contents + # Returns the content of the response as a string. This contains the contents # of any calls to <tt>render</tt>. def body strings = [] |