Skip to content

Instantly share code, notes, and snippets.

@FUT
Created June 11, 2013 13:09
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 FUT/5756676 to your computer and use it in GitHub Desktop.
Save FUT/5756676 to your computer and use it in GitHub Desktop.
Simple yml-encoded settings implementation.
class Settings
SETTINGS = YAML.load(File.read "#{Rails.root}/config/settings.yml")[Rails.env.to_sym]
def self.[](key)
SETTINGS[key]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment