aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/action_controller_overview.textile
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_coder@freenet.de>2009-02-17 14:04:42 +0100
committerAndreas Scherer <andreas_coder@freenet.de>2009-02-17 14:04:42 +0100
commit5c4af5973228e9e2d4aafbbcb89cfd08afb2370c (patch)
tree6bbed9bb1c6579c3dae0bb4ce2548695706932ab /railties/guides/source/action_controller_overview.textile
parentd5376a247f804b331f8157c461c61213e3c1ce35 (diff)
downloadrails-5c4af5973228e9e2d4aafbbcb89cfd08afb2370c.tar.gz
rails-5c4af5973228e9e2d4aafbbcb89cfd08afb2370c.tar.bz2
rails-5c4af5973228e9e2d4aafbbcb89cfd08afb2370c.zip
Use tables for object properties and their purposes.
Enumeration lists with bipartite entries could be harder to read than two-column tables.
Diffstat (limited to 'railties/guides/source/action_controller_overview.textile')
-rw-r--r--railties/guides/source/action_controller_overview.textile36
1 files changed, 19 insertions, 17 deletions
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