method

with_temporary_pool

rails latest stable - Class: ActiveRecord::PendingMigrationConnection

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

with_temporary_pool(db_config, &block)
public

No documentation available.

# File activerecord/lib/active_record/migration/pending_migration_connection.rb, line 5
    def self.with_temporary_pool(db_config, &block)
      pool = ActiveRecord::Base.connection_handler.establish_connection(db_config, owner_name: self)

      yield pool
    ensure
      ActiveRecord::Base.connection_handler.remove_connection_pool(self.name)
    end