diff --git a/pages/common/rails-routes.md b/pages/common/rails-routes.md new file mode 100644 index 0000000000..8d6eae808d --- /dev/null +++ b/pages/common/rails-routes.md @@ -0,0 +1,20 @@ +# rails routes + +> List routes in a Rails application. +> More information: . + +- 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 {{posts_path|GET|/posts}}` + +- List routes that map to a specified controller: + +`rails routes -c {{posts|Posts|Blogs::PostsController}}`