aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/rescuable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/new_base/rescuable.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/rescuable.rb31
1 files changed, 15 insertions, 16 deletions
diff --git a/actionpack/lib/action_controller/new_base/rescuable.rb b/actionpack/lib/action_controller/new_base/rescuable.rb
index 29ffe19d5f..029e643d93 100644
--- a/actionpack/lib/action_controller/new_base/rescuable.rb
+++ b/actionpack/lib/action_controller/new_base/rescuable.rb
@@ -15,7 +15,7 @@ module ActionController #:nodoc:
# behavior is achieved by overriding the <tt>rescue_action_in_public</tt>
# and <tt>rescue_action_locally</tt> methods.
module Rescue
- extend ActiveSupport::DependencyModule
+ extend ActiveSupport::Concern
included do
include ActiveSupport::Rescuable
@@ -32,22 +32,21 @@ module ActionController #:nodoc:
attr_internal :rescued_exception
- private
-
- def method_for_action(action_name)
- return action_name if self.rescued_exception = request.env.delete("action_dispatch.rescue.exception")
- super
- end
+ private
+ def method_for_action(action_name)
+ return action_name if self.rescued_exception = request.env.delete("action_dispatch.rescue.exception")
+ super
+ end
- def _rescue_action
- rescue_with_handler(rescued_exception) || raise(rescued_exception)
- end
+ def _rescue_action
+ rescue_with_handler(rescued_exception) || raise(rescued_exception)
+ end
- def process_action(*)
- super
- rescue Exception => exception
- self.rescued_exception = exception
- _rescue_action
- end
+ def process_action(*)
+ super
+ rescue Exception => exception
+ self.rescued_exception = exception
+ _rescue_action
+ end
end
end