]> git.openstreetmap.org Git - rails.git/blobdiff - config/preinitializer.rb
Fix vagrant to install all thee 3GL functions
[rails.git] / config / preinitializer.rb
index 818146c218a4c060da3739e52abff094e7a78b71..de8367e9f81cbadd4cdc937e96176b2a0dfa572d 100644 (file)
@@ -1,9 +1,9 @@
-require 'yaml'
+require "yaml"
 
 if defined?(Rake.application) && Rake.application.top_level_tasks.grep(/^(default$|test(:|$))/).any?
   env = "test"
 else
-  env = ENV['RAILS_ENV'] || 'development'
+  env = ENV["RAILS_ENV"] || "development"
 end
 
 config = YAML.load_file(File.expand_path(env == "test" ? "../example.application.yml" : "../application.yml", __FILE__))
@@ -15,7 +15,5 @@ ENV.each do |key, value|
 end
 
 config[env].each do |key, value|
-  unless Object.const_defined?(key.upcase)
-    Object.const_set(key.upcase, value)
-  end
+  Object.const_set(key.upcase, value) unless Object.const_defined?(key.upcase)
 end