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
- .establish_temporary_connection(db_config, &block) ⇒ Object
- .primary_class? ⇒ Boolean
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 |
.establish_temporary_connection(db_config, &block) ⇒ Object
5 6 7 8 9 10 11 |
# File '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 |
.primary_class? ⇒ Boolean
13 14 15 |
# File 'lib/active_record/migration/pending_migration_connection.rb', line 13 def self.primary_class? false end |