Module: FearOf::Callbacks

Defined in:
lib/fear-of/callbacks.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/fear-of/callbacks.rb', line 4

def self.included(base)
  base.send :alias_method_chain, :run_callbacks, :logging
end

Instance Method Details

#run_callbacks_with_logging(kind, options = {}, &block) ⇒ Object



8
9
10
11
# File 'lib/fear-of/callbacks.rb', line 8

def run_callbacks_with_logging(kind, options = {}, &block)
  ActiveRecord::Base.logger.debug "== Callback => #{self.class} - #{kind}"
  run_callbacks_without_logging(kind, options = {}, &block)
end