Module: YogiBerra::ActionControllerCatcher
- Defined in:
- lib/yogi_berra/action_controller_catcher.rb
Class Method Summary collapse
-
.included(base) ⇒ Object
Sets up an alias chain to catch exceptions for Rails 2.
Class Method Details
.included(base) ⇒ Object
Sets up an alias chain to catch exceptions for Rails 2
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/yogi_berra/action_controller_catcher.rb', line 5 def self.included(base) if base.method_defined?(:rescue_action_in_public) base.send(:alias_method, :rescue_action_in_public_without_yogi, :rescue_action_in_public) base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_yogi) if YogiBerra.settings base.send(:alias_method, :rescue_action_locally_without_yogi, :rescue_action_locally) base.send(:alias_method, :rescue_action_locally, :rescue_action_locally_with_yogi) end end end |