Module: ActionController::Rescue
- Defined in:
- lib/action_controller/rescue.rb
Overview
Actions that fail to perform as expected throw exceptions. These exceptions can either be rescued for the public view (with a nice user-friendly explanation) or for the developers view (with tons of debugging information). The developers view is already implemented by the Action Controller, but the public view should be tailored to your specific application. So too could the decision on whether something is a public or a developer request.
You can tailor the rescuing behavior and appearance by overwriting the following two stub methods.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.append_features(base) ⇒ Object
:nodoc:.
Class Method Details
.append_features(base) ⇒ Object
:nodoc:
9 10 11 12 13 14 15 16 |
# File 'lib/action_controller/rescue.rb', line 9 def self.append_features(base) #:nodoc: super base.extend(ClassMethods) base.class_eval do alias_method :perform_action_without_rescue, :perform_action alias_method :perform_action, :perform_action_with_rescue end end |