Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid loading the ActiveRecord::SessionStore class on initialization …

…if it is not in use [#2737 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
commit 60122e81a3504ed171a761573ed16cb034c79c13 1 parent ead5d88
@lukemelia lukemelia authored lifo committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/initializer.rb
View
2  railties/lib/initializer.rb
@@ -442,7 +442,7 @@ def initialize_database
def initialize_database_middleware
if configuration.frameworks.include?(:active_record)
if configuration.frameworks.include?(:action_controller) &&
- ActionController::Base.session_store == ActiveRecord::SessionStore
+ ActionController::Base.session_store.name == 'ActiveRecord::SessionStore'
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement
configuration.middleware.insert_before :"ActiveRecord::SessionStore", ActiveRecord::QueryCache
else
Please sign in to comment.
Something went wrong with that request. Please try again.