diff --git a/app/controllers/exception_handler/exceptions_controller.rb b/app/controllers/exception_handler/exceptions_controller.rb index 4f2f2389..bd62ba26 100644 --- a/app/controllers/exception_handler/exceptions_controller.rb +++ b/app/controllers/exception_handler/exceptions_controller.rb @@ -22,7 +22,11 @@ class ExceptionsController < ApplicationController # => Response format (required for non-standard formats (.css / .gz etc)) # => request.format required until responders updates with wildcard / failsafe (:all) - before_action { |e| e.request.format = :html unless self.class.respond_to.include? e.request.format } + before_action do |e| + verify_requested_format! + rescue + e.request.format = :html + end # => Routes # => Removes need for "main_app" prefix in routes