Module: RailsSettings
- Defined in:
- lib/rails_settings.rb,
lib/rails_settings/engine.rb
Defined Under Namespace
Classes: Engine
Class Method Summary collapse
Class Method Details
.load_settings ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rails_settings.rb', line 9 def self.load_settings @raw_config = YAML.load(File.read("#{Rails.root}/config/settings.yml")) @raw_settings = (@raw_config['global'] || {}).symbolize_keys.merge (@raw_config[Rails.env] || {}).symbolize_keys @settings = OpenStruct.new @raw_settings Kernel.const_set 'Settings', @settings end |
.settings ⇒ Object
5 6 7 |
# File 'lib/rails_settings.rb', line 5 def self.settings @settings end |