Class: Panda::CMS::ExceptionsApp
- Inherits:
-
Object
- Object
- Panda::CMS::ExceptionsApp
- Defined in:
- lib/panda/cms/exceptions_app.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(exceptions_app:) ⇒ ExceptionsApp
constructor
A new instance of ExceptionsApp.
Constructor Details
#initialize(exceptions_app:) ⇒ ExceptionsApp
Returns a new instance of ExceptionsApp.
7 8 9 |
# File 'lib/panda/cms/exceptions_app.rb', line 7 def initialize(exceptions_app:) @exceptions_app = exceptions_app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/panda/cms/exceptions_app.rb', line 11 def call(env) request = ActionDispatch::Request.new(env) fallback_to_html_format_if_invalid_mime_type(request) @exceptions_app.call(env) end |