Skip to content

Instantly share code, notes, and snippets.

@shreyas-satish
Created August 28, 2011 14:39
Show Gist options
  • Save shreyas-satish/1176745 to your computer and use it in GitHub Desktop.
Save shreyas-satish/1176745 to your computer and use it in GitHub Desktop.
Rails config
module APPNAME
class Application < Rails::Application
config_file = YAML.load_file("#{Rails.root}/config/settings.yml")
global = config_file['global'].symbolize_keys
config.settings = global.merge( config_file[Rails.env].symbolize_keys )
# Use: APPNAME::Application.config.settings[:setting_var]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment