Class: ActiveRecord::PendingMigrationConnection
- Inherits:
-
Object
- Object
- ActiveRecord::PendingMigrationConnection
- Defined in:
- lib/active_record/migration/pending_migration_connection.rb
Overview
:nodoc:
Class Method Summary collapse
- .current_preventing_writes ⇒ Object
- .primary_class? ⇒ Boolean
- .with_temporary_pool(db_config, &block) ⇒ Object
Class Method Details
.current_preventing_writes ⇒ Object
17 18 19 |
# File 'lib/active_record/migration/pending_migration_connection.rb', line 17 def self.current_preventing_writes false end |
.primary_class? ⇒ Boolean
13 14 15 |
# File 'lib/active_record/migration/pending_migration_connection.rb', line 13 def self.primary_class? false end |
.with_temporary_pool(db_config, &block) ⇒ Object
5 6 7 8 9 10 11 |
# File '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 |