aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-08 18:29:58 +0200
committerXavier Noria <fxn@hashref.com>2010-08-08 18:31:19 +0200
commitddeaf6c8877599b18b371232e72ed7150f5bb688 (patch)
tree31d0cff8d6dd23726349352b7b2620f94dc1cf24 /railties/guides
parent5598d3ac2ee8d1d5da79a73c91bcf93c9270a124 (diff)
downloadrails-ddeaf6c8877599b18b371232e72ed7150f5bb688.tar.gz
rails-ddeaf6c8877599b18b371232e72ed7150f5bb688.tar.bz2
rails-ddeaf6c8877599b18b371232e72ed7150f5bb688.zip
routing guide: documents the CONTROLLER environment variable understood by the routes task
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/routing.textile6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 7b665d81e7..625941ba31 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -762,6 +762,12 @@ formatted_users GET /users.:format {:controller=>"users", :action=>"index"}
POST /users.:format {:controller=>"users", :action=>"create"}
</pre>
+You may restrict the listing to the routes that map to a particular controller setting the +CONTROLLER+ environment variable:
+
+<shell>
+$ CONTROLLER=users rake routes
+</shell>
+
TIP: You'll find that the output from +rake routes+ is much more readable if you widen your terminal window until the output lines don't wrap.
h4. Testing Routes