Sha256: 45525928456d8fde494862275e1a2f26efc16a6100ba0740d4847e4448771cba

Contents?: true

Size: 243 Bytes

Versions: 8

Compression:

Stored size: 243 Bytes

Contents

class Grape::App::Middleware::ConnectionManagement
  def initialize(app)
    @app = app
  end

  def call(env)
    @app.call(env)
  rescue ::ActiveRecord::StatementInvalid
    ::ActiveRecord::Base.clear_active_connections!
    raise
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grape-app-0.11.3 lib/grape/app/middleware/connection_management.rb
grape-app-0.11.2 lib/grape/app/middleware/connection_management.rb
grape-app-0.11.1 lib/grape/app/middleware/connection_management.rb
grape-app-0.11.0 lib/grape/app/middleware/connection_management.rb
grape-app-0.10.1 lib/grape/app/middleware/connection_management.rb
grape-app-0.10.0 lib/grape/app/middleware/connection_management.rb
grape-app-0.9.0 lib/grape/app/middleware/connection_management.rb
grape-app-0.8.8 lib/grape/app/middleware/connection_management.rb