method
establish_temporary_connection
v7.1.3.2 -
Show latest stable
- Class:
ActiveRecord::PendingMigrationConnection
establish_temporary_connection(db_config, &block)public
No documentation available.
# File activerecord/lib/active_record/migration/pending_migration_connection.rb, line 5
def self.establish_temporary_connection(db_config, &block)
pool = ActiveRecord::Base.connection_handler.establish_connection(db_config, owner_name: self)
yield pool.connection
ensure
ActiveRecord::Base.connection_handler.remove_connection_pool(self.name)
end