There's a table with a list of user on an html page. How can I generate a link to a page where I show an information about a single user? "/users/:user_name" ?
I can hard-code it, of course. But I want to be safer by generating with help of Iron.
There's a table with a list of user on an html page. How can I generate a link to a page where I show an information about a single user? "/users/:user_name" ?
I can hard-code it, of course. But I want to be safer by generating with help of Iron.
Copyright © 2021 Jogjafile Inc.
Iron's router has two macros that work together.
router!
allows you to define routes with a key:url_for!
allows you to generate a URL for a key: