Reputation: 3398
I wanna generate some routes for my scaffold, but in some way that all of then looks something like:
/companys/:type
/companys/:type/new
/companys/:type/:id/edit
so I can catch that "type" param on my controllers. I don't wanna do it manually... Is there some way to easily add that :type param? Thanks!
Upvotes: 1
Views: 82
Reputation: 6753
resources :companys, path: '/companys/:type'
It's worth nothing that the inflector will pluralize company
to companies
instead of companys.
Upvotes: 3