1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/rails-routes.md

21 lines
494 B
Markdown
Raw Normal View History

2020-03-20 13:57:27 -07:00
# rails routes
> List routes in a Rails application.
> More information: <https://guides.rubyonrails.org/routing.html>.
- List all routes:
`rails routes`
- List all routes in an expanded format:
`rails routes --expanded`
- List routes partially matching URL helper method name, HTTP verb, or URL path:
`rails routes {{[-g|--grep]}} {{posts_path|GET|/posts}}`
2020-03-20 13:57:27 -07:00
- List routes that map to a specified controller:
`rails routes {{[-c|--controller]}} {{posts|Posts|Blogs::PostsController}}`