Rail Routes: Controller namespaces with constraints (subdomains)
问题 The intention is to create a subdomain to hold all the administrative function (CRUD) and the name of the subdomain is " admin ". The set of controllers responsible are also organized under the namespace of " admin ", i.e. the controllers are under the app/controllers/admin directory . Ideally, the following routes should be admin.mydomain.com/products/ admin.mydomain.com/products/new ... and not admin.mydomain.com/admin/products/ admin.mydomain.com/admin/products/new ... I would like to keep