From ddeaf6c8877599b18b371232e72ed7150f5bb688 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 8 Aug 2010 18:29:58 +0200 Subject: routing guide: documents the CONTROLLER environment variable understood by the routes task --- railties/guides/source/routing.textile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'railties') 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"} +You may restrict the listing to the routes that map to a particular controller setting the +CONTROLLER+ environment variable: + + +$ CONTROLLER=users rake routes + + 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 -- cgit v1.2.3