Skip to content

Instantly share code, notes, and snippets.

@johnhamelink
Created March 12, 2014 00:53
Show Gist options
  • Select an option

  • Save johnhamelink/9498416 to your computer and use it in GitHub Desktop.

Select an option

Save johnhamelink/9498416 to your computer and use it in GitHub Desktop.
require 'rake'
require 'apartment/elevators/subdomain'
#
# Apartment Configuration
#
Apartment.configure do |config|
config.excluded_models = ['School', 'Path', 'Icon', 'IconFile', 'Category', 'Text', 'Widget', 'Swatch']
config.use_schemas = true
config.persistent_schemas = ['hstore', 'uuid']
config.tenant_names = lambda{ School.pluck :database }
end
Rails.application.config.middleware.use 'Apartment::Elevators::Subdomain'
Apartment::Elevators::Subdomain.excluded_subdomains = ['www']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment