Say if I have a controller, profile, which has just two actions. The first one is list
, which will just show the list of names. I want these names to be links which will then take you to a page that shows the full profile. So I need a second action, view
, which can then bed fed a parameter to indicate which profile to view.
For example: I would access /profile/list
, then if I want to view John's profile, I will click on his name which should take me to /profile/view/john
. My view action will read the john parameter and then make the appropriate database queries.
What changes do I have to make to routes.rb for this to happen? Cheers.