Class: Debugbar::QuietRoutes
- Inherits:
-
Object
- Object
- Debugbar::QuietRoutes
- Defined in:
- lib/debugbar/middlewares/quiet_routes.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ QuietRoutes
constructor
A new instance of QuietRoutes.
Constructor Details
#initialize(app) ⇒ QuietRoutes
Returns a new instance of QuietRoutes.
10 11 12 13 |
# File 'lib/debugbar/middlewares/quiet_routes.rb', line 10 def initialize(app) @app = app @route_regex = %r(\A/{0,2}#{::Debugbar.config.prefix}) end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/debugbar/middlewares/quiet_routes.rb', line 15 def call(env) if env['PATH_INFO'] =~ @route_regex ::Rails.logger.silence { @app.call(env) } else @app.call(env) end end |