diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-25 22:54:41 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-25 22:54:41 -0500 |
commit | 5fba5409f7cffc67a5966fc386c945b5a935c60c (patch) | |
tree | a3868fb9d8e377422d052106f47f61c28bfa2277 /railties/lib/rails/initializer.rb | |
parent | 85e0a6cd7df2081c5578fe4b563f26d1cc791b6b (diff) | |
download | rails-5fba5409f7cffc67a5966fc386c945b5a935c60c.tar.gz rails-5fba5409f7cffc67a5966fc386c945b5a935c60c.tar.bz2 rails-5fba5409f7cffc67a5966fc386c945b5a935c60c.zip |
Fix railties tests
Diffstat (limited to 'railties/lib/rails/initializer.rb')
-rw-r--r-- | railties/lib/rails/initializer.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/initializer.rb b/railties/lib/rails/initializer.rb index 7501d4e0e2..8a34411ce7 100644 --- a/railties/lib/rails/initializer.rb +++ b/railties/lib/rails/initializer.rb @@ -510,7 +510,7 @@ Run `rake gems:install` to install the missing gems. # # Setup database middleware after initializers have run Initializer.default.add :initialize_database_middleware do if configuration.frameworks.include?(:active_record) - if configuration.frameworks.include?(:action_controller) && + if configuration.frameworks.include?(:action_controller) && ActionController::Base.session_store && ActionController::Base.session_store.name == 'ActiveRecord::SessionStore' configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::QueryCache @@ -581,6 +581,8 @@ Run `rake gems:install` to install the missing gems. end Initializer.default.add :build_application do - Rails.application = Rails::Application.new + if configuration.frameworks.include?(:action_controller) + Rails.application = Rails::Application.new + end end end |