aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/initializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/initializer.rb')
-rw-r--r--railties/lib/initializer.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 3c0d5940ea..7ae766f913 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -445,7 +445,8 @@ Run `rake gems:install` to install the missing gems.
def initialize_database_middleware
if configuration.frameworks.include?(:active_record)
- if ActionController::Base.session_store == ActiveRecord::SessionStore
+ if configuration.frameworks.include?(:action_controller) &&
+ ActionController::Base.session_store == ActiveRecord::SessionStore
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::QueryCache
else
@@ -886,7 +887,7 @@ Run `rake gems:install` to install the missing gems.
# Enable threaded mode. Allows concurrent requests to controller actions and
# multiple database connections. Also disables automatic dependency loading
- # after boot, and disables reloading code on every request, as these are
+ # after boot, and disables reloading code on every request, as these are
# fundamentally incompatible with thread safety.
def threadsafe!
self.preload_frameworks = true
@@ -1129,3 +1130,4 @@ class Rails::OrderedOptions < Array #:nodoc:
return false
end
end
+