Permalink
Browse files

routing guide: documents the CONTROLLER environment variable understo…

…od by the routes task
  • Loading branch information...
1 parent 783dc52 commit 4b18d3c21019cd90aa6f07c9b6a21362aa047390 @fxn fxn committed Aug 8, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 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

0 comments on commit 4b18d3c

Please sign in to comment.