Sha256: b9216df2514e83ea8489458013bf10babcd3184882a946c28dce8f58d4eeee90

Contents?: true

Size: 526 Bytes

Versions: 20

Compression:

Stored size: 526 Bytes

Contents

# This patch enables the exception handler to catch routing errors
module ActionDispatch
  class ShowExceptions
    private
      def render_exception_with_template(env, exception)
        if(RailsExceptionHandler.configuration.environments.include?(Rails.env.to_sym))
          RailsExceptionHandler::Handler.new(env, exception).handle_exception
        else
          raise "RailsExceptionHandler: This patch should not have been loaded"
        end
      end
      alias_method_chain :render_exception, :template
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rails_exception_handler-2.3.4 lib/patch/show_exceptions.rb
rails_exception_handler-2.3.3 lib/patch/show_exceptions.rb
rails_exception_handler-2.3.2 lib/patch/show_exceptions.rb
rails_exception_handler-2.3.1 lib/patch/show_exceptions.rb
rails_exception_handler-2.3.0 lib/patch/show_exceptions.rb
rails_exception_handler-2.2.0 lib/patch/show_exceptions.rb
rails_exception_handler-2.1.0 lib/patch/show_exceptions.rb
rails_exception_handler-2.0.2 lib/patch/show_exceptions.rb
rails_exception_handler-2.0.1 lib/patch/show_exceptions.rb
rails_exception_handler-2.0.0 lib/patch/show_exceptions.rb
rails_exception_handler-1.4.0 lib/patch/show_exceptions.rb
rails_exception_handler-1.3.2 lib/patch/show_exceptions.rb
rails_exception_handler-1.3.0 lib/patch/show_exceptions.rb
rails_exception_handler-1.2.1 lib/patch/show_exceptions.rb
rails_exception_handler-1.2.0 lib/patch/show_exceptions.rb
rails_exception_handler-1.1.2 lib/patch/show_exceptions.rb
rails_exception_handler-1.1.1 lib/patch/show_exceptions.rb
rails_exception_handler-1.1.0 lib/patch/show_exceptions.rb
rails_exception_handler-1.0.1 lib/patch/show_exceptions.rb
rails_exception_handler-1.0.0 lib/patch/show_exceptions.rb