diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-03 07:51:27 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-03 07:51:27 +0100 |
commit | 3fed7dd22475b16d207b477b73dc370bfeba73f9 (patch) | |
tree | dc8d847c272f777f34b53b91e926ba9bc34fcd05 /guides/source | |
parent | bcd0c8cfc250039ddc145c3302633c4890880930 (diff) | |
parent | fae17243984965b152d8212be6405ce840887018 (diff) | |
download | rails-3fed7dd22475b16d207b477b73dc370bfeba73f9.tar.gz rails-3fed7dd22475b16d207b477b73dc370bfeba73f9.tar.bz2 rails-3fed7dd22475b16d207b477b73dc370bfeba73f9.zip |
Merge pull request #23436 from y-yagi/use_bin_command_in_routes_task
use rails command in routes task
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/routing.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index d9e64d56ac..777d1d24b6 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -1139,18 +1139,18 @@ edit_user GET /users/:id/edit(.:format) users#edit You can search through your routes with the --grep option (-g for short). This outputs any routes that partially match the URL helper method name, the HTTP verb, or the URL path. ``` -$ bin/rake routes --grep new_comment -$ bin/rake routes -g POST -$ bin/rake routes -g admin +$ bin/rails routes --grep new_comment +$ bin/rails routes -g POST +$ bin/rails routes -g admin ``` If you only want to see the routes that map to a specific controller, there's the --controller option (-c for short). ``` -$ bin/rake routes --controller users -$ bin/rake routes --controller admin/users -$ bin/rake routes -c Comments -$ bin/rake routes -c Articles::CommentsController +$ bin/rails routes --controller users +$ bin/rails routes --controller admin/users +$ bin/rails routes -c Comments +$ bin/rails routes -c Articles::CommentsController ``` TIP: You'll find that the output from `rails routes` is much more readable if you widen your terminal window until the output lines don't wrap. |