No need to create a new module in the previous commit.

This commit is contained in:
José Valim 2010-07-19 14:49:20 +02:00
parent 33c5689e2d
commit ab6ff85906
4 changed files with 10 additions and 18 deletions

@ -28,7 +28,6 @@ module ActionController
autoload :Rendering
autoload :RequestForgeryProtection
autoload :Rescue
autoload :RescueWithHelper
autoload :Responder
autoload :SessionManagement
autoload :Streaming

@ -49,9 +49,7 @@ def self.without_modules(*modules)
AbstractController::Callbacks,
# The same with rescue, append it at the end to wrap as much as possible.
Rescue,
RescueWithHelper
Rescue
]
MODULES.each do |mod|

@ -3,6 +3,15 @@ module Rescue
extend ActiveSupport::Concern
include ActiveSupport::Rescuable
def rescue_with_handler(exception)
if ((exception.respond_to?(:original_exception)) &&
(orig_exception = exception.original_exception) &&
(orig_handler = handler_for_rescue(orig_exception)))
exception = orig_exception
end
super(exception)
end
private
def process_action(*args)
super

@ -1,14 +0,0 @@
module ActionController #:nodoc:
module RescueWithHelper
def rescue_with_handler(exception)
if ((exception.class == ActionView::TemplateError) &&
(orig_exception = exception.original_exception) &&
(orig_handler = handler_for_rescue(orig_exception)))
exception = orig_exception
end
super(exception)
end
end
end