Module: Bugsnag::Rails::ActionControllerRescue

Defined in:
lib/bugsnag/rails/action_controller_rescue.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bugsnag/rails/action_controller_rescue.rb', line 4

def self.included(base)
  base.extend(ClassMethods)

  # Hook into rails exception rescue stack
  base.send(:alias_method, :rescue_action_in_public_without_bugsnag, :rescue_action_in_public)
  base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_bugsnag)

  base.send(:alias_method, :rescue_action_locally_without_bugsnag, :rescue_action_locally)
  base.send(:alias_method, :rescue_action_locally, :rescue_action_locally_with_bugsnag)

  # Run filters on requests to capture request data
  base.send(:prepend_before_filter, :set_bugsnag_request_data)
end