Sha256: bdab8420fa4bbc5355a53e6fa38ee149c3d4e64348c0dcb8f7973b4da4455d3f

Contents?: true

Size: 314 Bytes

Versions: 33

Compression:

Stored size: 314 Bytes

Contents

module Protobuf
  module ActiveRecord
    module Middleware
      class ConnectionManagement
        def initialize(app)
          @app = app
        end

        def call(env)
          @app.call(env)
        ensure
          ::ActiveRecord::Base.clear_active_connections!
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
protobuf-activerecord-7.0.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-6.1.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-6.0.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-5.2.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-5.1.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-5.0.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-5.1.0.beta lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-5.0.0.beta lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.6.1 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.6.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.5.1 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.5.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.4 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.4.pre lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.3 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.2 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.1 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.4.0 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.3.8 lib/protobuf/active_record/middleware/connection_management.rb
protobuf-activerecord-3.3.7 lib/protobuf/active_record/middleware/connection_management.rb