Created
May 6, 2011 05:26
-
-
Save cloudbring/958485 to your computer and use it in GitHub Desktop.
Uninitialized constant Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# views/layouts/application.html.haml | |
# Rails Error: uninitialized constant ActionView::CompiledTemplates::DOMAIN_CONFIG | |
%p | |
Request Domain | |
= request.domain.inspect | |
DOMAIN_CONFIG: | |
= DOMAIN_CONFIG.to_yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multiple Domain Name Setup | |
# | |
# Map Various domain names: [deezteez.tld, anticlothes.tld] in | |
# config/domains.yml to theme which | |
require 'yaml' | |
raw_config = File.read(RAILS_ROOT + "/config/domains.yml") | |
DOMAINS_CONFIG = YAML.load(raw_config)[RAILS_ENV] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/domains.yml | |
production: | |
domains: | |
- | |
:name: foo.com | |
:template: foo | |
- | |
:name: bar.com | |
:template: bar | |
development: &non_production_settings | |
domains: | |
- | |
:name: foo.dev | |
:template: foo | |
- | |
:name: bar.dev | |
:template: bar | |
test: | |
<<: *non_production_settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment