class DisableConnectionPooling::ClearAllConnections

Public Class Methods

new(app) click to toggle source
# File lib/disable_connection_pooling/clear_all_connections.rb, line 2
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/disable_connection_pooling/clear_all_connections.rb, line 6
def call(env)
  @app.call(env)
ensure
  ActiveRecord::Base.clear_all_connections!
end