Skip to content

Commit

Permalink
Avoid loading the ActiveRecord::SessionStore class on initialization …
Browse files Browse the repository at this point in the history
…if it is not in use [#2737 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information
lukemelia authored and lifo committed Jul 27, 2009
1 parent ead5d88 commit 60122e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/initializer.rb
Expand Up @@ -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
Expand Down

0 comments on commit 60122e8

Please sign in to comment.