I’m brand-spanking new to Rails. I’ve learned how to make static controller actions and corresponding view files. Now I want to make it so that when I go to localhost:3000/hi/anita, the page says “Hi anita”, but when I go to localhost:3000/hi/bob, it says “Hi bob”. Of course, I don’t want to make anita and bob actions. You get the idea. Any hints how I can do that? Thanks!
I’m brand-spanking new to Rails. I’ve learned how to make static controller actions and
Share
I would define the route to accept the “last part” first and then retrieve it in the action: