-
-
Save jamesp/33045 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/app_config.yml | |
--- | |
defaults: &defaults | |
:name: Super Awesome Blog | |
:tagline: My super awesome blog and stuff. | |
:email: [email protected] | |
development: | |
<<: *defaults | |
# Override the defaults. | |
test: | |
<<: *defaults | |
# Override the defaults. | |
production: | |
<<: *defaults | |
# Override the defaults. | |
:tagline: My super awesome blog, in production! |
This file contains hidden or 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/init.rb | |
Merb::BootLoader.after_app_loads do | |
# This will get executed after your app's classes have been loaded. | |
begin | |
config_file = File.expand_path(Merb.root + '/config/app_config.yml') | |
AppConfig = YAML.load_file(config_file)[Merb.env] unless defined? AppConfig | |
rescue => error | |
puts 'AppConfig could not be loaded!' | |
puts error | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment