Say I have an application called employeesmanager, and it has an employees resource, so /employees/new is a new employee etc. I want to have the name of the company preceding this action, so for example, ford/employees/new should create a new employee at ford, while exxon/employees/new should create a new employee at exxon. What is the best way to do this?
Ideally I don’t want to have to use nested controllers with /company/exxon/employees/new because that seems like extra wasted words in the URL that can be annoying to type in.
For more details check out Rails Guides on routing.