Skip to content

Instantly share code, notes, and snippets.

@lenny
Created January 6, 2010 17:38
Show Gist options
  • Save lenny/270446 to your computer and use it in GitHub Desktop.
Save lenny/270446 to your computer and use it in GitHub Desktop.
class AppConfig
class << self
attr_accessor :site_name
attr_accessor :payment_gateway_mode
...
end
end
config.after_initialize do
AppConfig.payment_gateway_mode = :test
end
...
require 'app_config'
AppConfig.site_name = 'My Site'
..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment