aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.md
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2018-06-26 22:02:51 +0200
committerAlberto Almagro <albertoalmagro@gmail.com>2018-07-06 22:46:35 +0200
commit40b209db53796ae515387d0fee2a525872eb2ae4 (patch)
tree604a386af44a319c9cb136b9e1e260e7c59a4d7c /guides/source/routing.md
parenta0061d2389a178b093f0d3f64f58236ffbe088e0 (diff)
downloadrails-40b209db53796ae515387d0fee2a525872eb2ae4.tar.gz
rails-40b209db53796ae515387d0fee2a525872eb2ae4.tar.bz2
rails-40b209db53796ae515387d0fee2a525872eb2ae4.zip
Recommend use of rails over bin/rails
As discussed in #33203 rails command already looks for, and runs, bin/rails if it is present. We were mixing recommendations within guides and USAGE guidelines, in some files we recommended using rails, in others bin/rails and in some cases we even had both options mixed together.
Diffstat (limited to 'guides/source/routing.md')
-rw-r--r--guides/source/routing.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md
index 41f80a3814..6d7a1ad12c 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -1191,18 +1191,18 @@ edit_user GET /users/:id/edit(.:format) users#edit
You can search through your routes with the grep option: -g. This outputs any routes that partially match the URL helper method name, the HTTP verb, or the URL path.
```
-$ bin/rails routes -g new_comment
-$ bin/rails routes -g POST
-$ bin/rails routes -g admin
+$ rails routes -g new_comment
+$ rails routes -g POST
+$ rails routes -g admin
```
If you only want to see the routes that map to a specific controller, there's the -c option.
```
-$ bin/rails routes -c users
-$ bin/rails routes -c admin/users
-$ bin/rails routes -c Comments
-$ bin/rails routes -c Articles::CommentsController
+$ rails routes -c users
+$ rails routes -c admin/users
+$ rails routes -c Comments
+$ 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. You can also use --expanded option to turn on the expanded table formatting mode.