Add `routes.txt` with `rails routes` dump
What does this MR do and why?
Rails routes is an important concept to find an entrypoint to understand how code works. Even before writing code it is useful to take a look at the routes table to unwind the logic starting from the URL of the page that needs to be fixed.
Unfortunately, viewing routes requires a working GDK setup.
https://docs.gitlab.com/ee/development/routing.html#view-all-available-routes
It is not always possible to setup GDK, and it is takes time to start even in prebaked environments like Gitpod. So a cached version of actual routes could really save a day for people who are just looking how things work, and maybe even inspire them to take a next step towards MR.
Ideally this file should be regenerated automatically and contain a header explaining how it is done.
A wishlist for the routes map info:
-
Update automatically when routes change to see updates in MR diffs -
Add header explaining what the routes.txt
file is for -
Link routes.txt
to entrypoint docs so that people know it is discoverable -
Deploy static route debugger https://rubyonrails.org/2016/8/20/this-week-in-rails-read-me-to-learn-a-cool-trick
For now routes.txt
is just a manual dump of rails routes
.
Screenshots or screen recordings
How to set up and validate locally
- Go to https://docs.gitlab.com/ee/development/routing.html#view-all-available-routes
- Follow the link to the route mapper
- Enter URL like http://127.0.0.1:3000/groups/flightjs/-/group_members
- Get where this URL maps to, and the link to corresponding controller method
(bonus points) Describe how to get backend handlers the invite members
button.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.