Class: Locomotive::Middlewares::CustomPublicExceptions
- Inherits:
-
ActionDispatch::PublicExceptions
- Object
- ActionDispatch::PublicExceptions
- Locomotive::Middlewares::CustomPublicExceptions
- Defined in:
- lib/locomotive/middlewares/custom_public_exceptions.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/locomotive/middlewares/custom_public_exceptions.rb', line 6 def call(env) status = env['PATH_INFO'][1..-1] if status == '404' || status == '500' Locomotive::ErrorsController.action(:"error_#{status}").call(env) else super end end |