method

connection_handlers=

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Core

Method deprecated or moved

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

connection_handlers=(handlers) public

No documentation

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

Hide source
# File activerecord/lib/active_record/core.rb, line 111
      def self.connection_handlers=(handlers)
        if ActiveRecord.legacy_connection_handling
          ActiveSupport::Deprecation.warn(<<~MSG)
            Using legacy connection handling is deprecated. Please set
            `legacy_connection_handling` to `false` in your application.

            The new connection handling does not support `connection_handlers`
            getter and setter.

            Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
          MSG
        else
          raise NotImplementedError, "The new connection handling does not support multiple connection handlers."
        end

        @@connection_handlers = handlers
      end
Register or log in to add new notes.