From 5c4af5973228e9e2d4aafbbcb89cfd08afb2370c Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Tue, 17 Feb 2009 14:04:42 +0100 Subject: Use tables for object properties and their purposes. Enumeration lists with bipartite entries could be harder to read than two-column tables. --- .../source/action_controller_overview.textile | 36 ++++++++++++---------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index f9b7a3fe14..84d98dd6ed 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -521,17 +521,18 @@ h4. The +request+ object The request object contains a lot of useful information about the request coming in from the client. To get a full list of the available methods, refer to the "API documentation":http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html. Among the properties that you can access on this object are: -* host - The hostname used for this request. -* domain(n=2) - The hostname's first +n+ segments, starting from the right (the TLD) -* format - The content type requested by the client. -* method - The HTTP method used for the request. -* get?, post?, put?, delete?, head? - Returns true if the HTTP method is GET/POST/PUT/DELETE/HEAD. -* headers - Returns a hash containing the headers associated with the request. -* port - The port number (integer) used for the request. -* protocol - Returns a string containing the protocol used plus "://", for example "http://" -* query_string - The query string part of the URL - everything after "?". -* remote_ip - The IP address of the client. -* url - The entire URL used for the request. +|_.Property of +request+|_.Purpose| +|host|The hostname used for this request.| +|domain(n=2)|The hostname's first +n+ segments, starting from the right (the TLD).| +|format|The content type requested by the client.| +|method|The HTTP method used for the request.| +|get?, post?, put?, delete?, head?|Returns true if the HTTP method is GET/POST/PUT/DELETE/HEAD.| +|headers|Returns a hash containing the headers associated with the request.| +|port|The port number (integer) used for the request.| +|protocol|Returns a string containing the protocol used plus "://", for example "http://".| +|query_string|The query string part of the URL, i.e., everything after "?".| +|remote_ip|The IP address of the client.| +|url|The entire URL used for the request.| h5. +path_parameters+, +query_parameters+, and +request_parameters+ @@ -541,12 +542,13 @@ h4. The response object The response object is not usually used directly, but is built up during the execution of the action and rendering of the data that is being sent back to the user, but sometimes - like in an after filter - it can be useful to access the response directly. Some of these accessor methods also have setters, allowing you to change their values. -* body - This is the string of data being sent back to the client. This is most often HTML. -* status - The HTTP status code for the response, like 200 for a successful request or 404 for file not found. -* location - The URL the client is being redirected to, if any. -* content_type - The content type of the response. -* charset - The character set being used for the response. Default is "utf-8". -* headers - Headers used for the response. +|_.Property of +response+|_.Purpose| +|body|This is the string of data being sent back to the client. This is most often HTML.| +|status|The HTTP status code for the response, like 200 for a successful request or 404 for file not found.| +|location|The URL the client is being redirected to, if any.| +|content_type|The content type of the response.| +|charset|The character set being used for the response. Default is "utf-8".| +|headers|Headers used for the response.| h5. Setting custom headers -- cgit v1.2.3