I have several domains, say foo.com and baz.com, pointing to the same application.
For some of these domains I need to include the locale in the URL, and for other ones the locale should not be present in the URL.
For example, foo.com/en/about would be the same as baz.com/about.
What I thought of, is including something like (:locale) conditionally in the URL, based on the domain.
I wonder if it is possible to detect the domain of the request in the routes.rb file?
For example something like request.domain which is available from a controller, but from the routes.rb file.