Class: PandaCms::ExceptionsApp
- Inherits:
-
Object
- Object
- PandaCms::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.
4 5 6 |
# File 'lib/panda_cms/exceptions_app.rb', line 4 def initialize(exceptions_app:) @exceptions_app = exceptions_app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/panda_cms/exceptions_app.rb', line 8 def call(env) request = ActionDispatch::Request.new(env) fallback_to_html_format_if_invalid_mime_type(request) @exceptions_app.call(env) end |