Skip to content

Instantly share code, notes, and snippets.

@ewalk153
Created January 2, 2020 21:17
Show Gist options
  • Select an option

  • Save ewalk153/b2948b39b1873e4c0adf56aafcfe1d85 to your computer and use it in GitHub Desktop.

Select an option

Save ewalk153/b2948b39b1873e4c0adf56aafcfe1d85 to your computer and use it in GitHub Desktop.
debugging middleware
Dir["./app/middleware/*.rb"].each do |file|
require file
end
config.middleware.use(::DebugMiddleware)
class DebugMiddleware
def initialize(app)
@app = app
end
def call(env)
return @app.call(env)
rescue => err
puts err.inspect
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment