Options (3)
-E, --expandedbooleanList all routes in an expanded format
Example:
rails routes {{[-E|--expanded]}}-g, --grepbooleanList routes partially matching URL helper method name, HTTP verb, or URL path
Example:
rails routes {{[-g|--grep]}} {{posts_path|GET|/posts}}-c, --controllerbooleanList routes that map to a specified controller
Example:
rails routes {{[-c|--controller]}} {{posts|Posts|Blogs::PostsController}}Examples (4)
List all routes
List all routes in an expanded format
rails routes [-E|--expanded]List routes partially matching URL helper method name, HTTP verb, or URL path
rails routes [-g|--grep] posts_path|GET|/postsList routes that map to a specified controller
rails routes [-c|--controller] posts|Posts|Blogs::PostsControllermade by @shridhargupta | data from tldr-pages