List all routes for a Rails application

Written on July 17, 2018

To list all the routes available for a Rails application you can run this command from within the Rails project folder.

rails routes

This will list all the routes defined in an application, it’s HTTP method and other useful bits of information. I find this information handy in instances where I’m trying to use the link_to helper to generate links.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image