load_config.rb 212 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 require 'ostruct' yaml = File.read(Rails.root.join('config','config.yml')) config = YAML.load(yaml) config.merge!(config.delete(Rails.env)) if config.has_key?(Rails.env) Errbit::Config = OpenStruct.new(config)