Title Image

March 12, 2021

Hola. 👋🏾

When I first started learning Rails a lot of the "rails magic" threw me off because I didn't understand how all of this stuff just came to be. In a sense I could understand how it could be useful, but as a visual and kinesthetic learner, I appreciate being able to see exactly how one piece leads to the next. Typing a command and having a whole bunch of stuff just happen took a while to understand. I'm still learning it to be honest.

One of the things that made very little sense to me initially was how routes worked. Generating a controller automagically means that now I have all these pages, routes and paths?? So when I happened across this next piece of code it helped me out tremendously.

1/rails/info/routes

When in a local dev environment, add the above to the end of your endpoint. It'll show you all of the paths in the app, plus the url and controller they may to. :raised-hands: Something like localhost:3000/rails/info/routes.

Hope that helps!

See you next time. 🙃