aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-12-07 03:27:53 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-12-07 03:27:53 +0100
commitdbbae5e00e49d3a69dc10978e38299e3f28dd1e1 (patch)
tree592710207a614428d5cb809f6e13c8b546b58969 /railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
parent9eca588bdfbb41f6b48477025d1cd8eea4a38296 (diff)
downloadrails-dbbae5e00e49d3a69dc10978e38299e3f28dd1e1.tar.gz
rails-dbbae5e00e49d3a69dc10978e38299e3f28dd1e1.tar.bz2
rails-dbbae5e00e49d3a69dc10978e38299e3f28dd1e1.zip
Merge with docrails
Diffstat (limited to 'railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt')
-rw-r--r--railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt b/railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
index 07a8ec2574..846c24052d 100644
--- a/railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
+++ b/railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
@@ -7,13 +7,13 @@ In every controller there are two accessor methods pointing to the request and t
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 link:http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html[API documentation]. Among the properties that you can access on this object are:
* host - The hostname used for this request.
- * domain - The hostname without the first segment (usually "www").
+ * 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.
+ * 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 - The protocol used for the request.
+ * protocol - Returns a string containing the prototol 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.