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. |
append_features, prepend_features |
Instance Method Summary
DSL Calls
included
[ GitHub ]11 12 13 14 15
# File 'actioncable/lib/action_cable/server/worker/active_record_connection_management.rb', line 11
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 17
def with_database_connections(&block) connection.logger.tag(ActiveRecord::Base.logger, &block) end