3 ms·
Here's a basic middleware... pry_rescue.rb require 'pry/rescue' class PryRescue def initialize(app) @app = app end def call(env)
by blaines 14y ago
Here's a basic middleware...
pry_rescue.rb
require 'pry/rescue'
class PryRescue
def initialize(app)
@app = app
end
def call(env)
Pry::rescue{ @app.call(env) }
end
end
For rails you need to require the file and use the middleware...
application.rb
config.middleware.use "PryRescue"
- drewda 14y agoI know this is short and simple, but it still might be nice to wrap up in a gem. Or maybe work into the pry-rails gem?