method
with_temporary_pool
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::PendingMigrationConnection
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