Module: Watchtower::ApplicationControllerBase

Defined in:
lib/watchtower/application_controller_base.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/watchtower/application_controller_base.rb', line 6

def self.included(base)
  base.class_eval do
    def rescue_action_in_public_with_watchtower(*args)
      WatchedException.create_from_exception(self, args.first)
      rescue_action_in_public_without_watchtower(*args)
    end
    
    alias_method_chain :rescue_action_in_public, :watchtower
  end
  
  base.extend ClassMethods
end