I am writing an application that will use basecamp-style subdomains ( See post ).
There are parts of the application that should always be in the subdomain , and parts that should never be in the subdomain . For example, the home page should never be in a subdomain, but blogs and posting resources should always. Keep in mind that I do not know the subdomains, as there is one account.
I configured my routes like this (example). It works well in that it matches the routes, but it's hard for me to get the application to connect to the correct locations.
MyApp::Application.routes.draw do
constraints(Subdomain) do
resources :blogs { resources :posts }
end
constraints(NoSubDomain) do
resources :categories
end
end
, , , ( ..) . , . .