method

with_temporary_pool

rails latest stable - Class: ActiveRecord::Tasks::AbstractTasks

Method not available on this version

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

with_temporary_pool(db_config, migration_class, clobber: false)
private

No documentation available.

# File activerecord/lib/active_record/tasks/abstract_tasks.rb, line 66
        def with_temporary_pool(db_config, migration_class, clobber: false)
          original_db_config = migration_class.connection_db_config
          pool = migration_class.connection_handler.establish_connection(db_config, clobber: clobber)

          yield pool
        ensure
          migration_class.connection_handler.establish_connection(original_db_config, clobber: clobber)
        end