Module: ActiveRecord::SharedConnection
- Defined in:
- lib/active_record/shared_connection.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.with_shared_connection(model = ActiveRecord::Base, &block) ⇒ Object
11 12 13 |
# File 'lib/active_record/shared_connection.rb', line 11 def self.with_shared_connection(model = ActiveRecord::Base, &block) model.connection_pool.with_shared_connection(&block) end |
Instance Method Details
#with_shared_connection(&block) ⇒ Object
4 5 6 |
# File 'lib/active_record/shared_connection.rb', line 4 def with_shared_connection(&block) ActiveRecord::SharedConnection.with_shared_connection(self.class, &block) end |