diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-24 12:15:46 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-24 12:15:46 +0100 |
commit | b92608770e20618ab6a6c67099dd19ae4533689e (patch) | |
tree | 205b1303668555a31f3d228a58c84a10ac53093d /railties/lib/rails | |
parent | 37e4deb2606557e5340b48169ffc1435bb331439 (diff) | |
download | rails-b92608770e20618ab6a6c67099dd19ae4533689e.tar.gz rails-b92608770e20618ab6a6c67099dd19ae4533689e.tar.bz2 rails-b92608770e20618ab6a6c67099dd19ae4533689e.zip |
Ensure environment config has higher priority than application ones.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/bootstrap.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 90118c8cfc..e14719c758 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -11,7 +11,6 @@ module Rails autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' - # TODO Ensure production settings are read properly class << self private :new alias :configure :class_eval @@ -24,7 +23,6 @@ module Rails raise "You cannot have more than one Rails::Application" if Rails.application super Rails.application = base.instance - base.require_environment! end protected diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 819d00be4e..3c339ffc57 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -3,6 +3,10 @@ module Rails module Bootstrap include Initializable + initializer :load_environment_config do |app| + app.require_environment! + end + initializer :load_all_active_support do |app| require "active_support/all" unless app.config.active_support.bare end |