Flowdock
method

initialize_database_middleware

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: Rails::Initializer

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

initialize_database_middleware() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/initializer.rb, line 445
    def initialize_database_middleware
      if configuration.frameworks.include?(:active_record)
        if configuration.frameworks.include?(:action_controller) &&
            ActionController::Base.session_store.name == 'ActiveRecord::SessionStore'
          configuration.middleware.insert_before "ActiveRecord::SessionStore""ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement
          configuration.middleware.insert_before "ActiveRecord::SessionStore""ActiveRecord::SessionStore", ActiveRecord::QueryCache
        else
          configuration.middleware.use ActiveRecord::ConnectionAdapters::ConnectionManagement
          configuration.middleware.use ActiveRecord::QueryCache
        end
      end
    end
Register or log in to add new notes.