We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20f7a8e commit d70a1c9Copy full SHA for d70a1c9
1 file changed
lib/jammit.rb
@@ -65,11 +65,9 @@ def self.load_configuration(config_path, soft=false)
65
raise ConfigurationNotFound, "could not find the \"#{config_path}\" configuration file" unless exists
66
conf = YAML.load(ERB.new(File.read(config_path)).result)
67
68
- # Optionally overwrite configurations based on the environment
+ # Optionally overwrite configuration based on the environment.
69
rails_env = defined?(Rails) ? Rails.env : RAILS_ENV
70
- if conf.has_key?(rails_env) && conf[rails_env].is_a?(Hash)
71
- conf.merge!(conf.delete(rails_env))
72
- end
+ conf.merge! conf.delete rails_env if conf.has_key? rails_env
73
74
@config_path = config_path
75
@configuration = symbolize_keys(conf)
0 commit comments