From 4313461587254fd8e5b5a8ea7dfc9f0230c70ecb Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 26 Jan 2013 17:36:38 +0100 Subject: generic pass before merging docrails --- actionpack/lib/action_dispatch/http/response.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_dispatch/http') 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 Net::HTTPResponse. 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 render. def body strings = [] -- cgit v1.2.3