Skip to content

Instantly share code, notes, and snippets.

@manuelmeurer
Created June 16, 2010 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelmeurer/440522 to your computer and use it in GitHub Desktop.
Save manuelmeurer/440522 to your computer and use it in GitHub Desktop.
# config/initializers/aaa_load_app_config.rb
#
# Prefixed with "aaa_" so that it is loaded first and app configs can be used in later initializers
require 'ostruct'
::AppConfig = OpenStruct.new(YAML.load_file(Rails.root.join('config', 'app_config.yml')).with_indifferent_access)
# config/app_config.yml
#
# Example:
twitter:
username:
password:
bitly:
username:
api_key:
mail:
username:
password:
port: 587
address: smtp.gmail.com
from:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment