Module: ActionCable::Server::Worker::ActiveRecordConnectionManagement
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveSupport::Concern
|
|
Defined in: | actioncable/lib/action_cable/server/worker/active_record_connection_management.rb |
Class Method Summary
::ActiveSupport::Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
Instance Method Summary
DSL Calls
included
[ GitHub ]9 10 11 12 13
# File 'actioncable/lib/action_cable/server/worker/active_record_connection_management.rb', line 9
included do if defined?(ActiveRecord::Base) set_callback :work, :around, :with_database_connections end end
Instance Method Details
#with_database_connections(&block)
[ GitHub ]# File 'actioncable/lib/action_cable/server/worker/active_record_connection_management.rb', line 15
def with_database_connections(&block) connection.logger.tag(ActiveRecord::Base.logger, &block) end