I am setting up a SAAS solution where as each account has its own subdomain e.g. sub1.mydomain.com sub2.mydomain.com and in the application template I have setup a standard 2 column template in which I want to include on the aside column a custom partial for each site, as well as a custom style.css file for each subdomain.
So I’m wondering how could I set this up to show that custom info. I would like to setup a style controller – so it only shows the items of the left sidebar, and the style.css page for each domain name its associated with does anyone have any good ideas?
Basically for a static pages controller I have that setup already, as well as another DB action
But any tips would be appreciated.
Take a look at the project I’m working on: https://github.com/fabiob/guildhost-hosting
The code you need is in
app/controllers/application_controller.rb:Also in
app/views/layouts/application.html.erb:There’s a
/public/themesfolder in which resides the customization for each subdomain. Each subdomain has the opportunity to customize a single CSS,main.css. If more than one CSS file is needed,@importclauses should be used onmain.css.