If I have a single codebase that should dynamically select a layout based on the request, is there a way to do this? Can I intercept the request at the Application controller level and change layout from there?
This is primarily to avoid deploying the same codebase to 5 different directories.
You could use a Proc for your layout and choose the correct template for the host:
Obviously, this won’t coalesce subdomains to a single layout, but that’s left as an exercise for the reader..