How I Memorized Rails Routes

We are asked to memorize the 7 default routes created when we define a single entry in the routing file, for example resources :posts.

This is how I memorized the 7 routes and the 4 helpers in the Rails guides:

Image for post
Image for post

I used posts as an example of a resource and reorganized the table shown in the guide in a way that makes sense to me.

There are 4 paths, 4 helpers, and 7 routes. I know the verbs (methods) under each path must be unique, i.e., there can’t be two GET requests to /posts that route to two different actions. I fill in the verbs first, then their associated actions.

Finally, I write down the order in which the actions appear, by convention, in the controller file.

Have you memorized the routes? If yes, how did you do it?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store