aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/rescue_with_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/rescue_with_helper.rb')
-rw-r--r--actionpack/lib/action_controller/metal/rescue_with_helper.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/rescue_with_helper.rb b/actionpack/lib/action_controller/metal/rescue_with_helper.rb
new file mode 100644
index 0000000000..7894deaeef
--- /dev/null
+++ b/actionpack/lib/action_controller/metal/rescue_with_helper.rb
@@ -0,0 +1,14 @@
+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