Class: BBK::App::Middlewares::ActiveRecordPool

Inherits:
Base
  • Object
show all
Defined in:
lib/bbk/app/middlewares/active_record_pool.rb

Instance Attribute Summary

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BBK::App::Middlewares::Base

Instance Method Details

#call(msg) ⇒ Object



10
11
12
13
14
# File 'lib/bbk/app/middlewares/active_record_pool.rb', line 10

def call(msg)
  ::ActiveRecord::Base.connection_pool.with_connection do
    app.call(msg)
  end
end