module AfterCommitExceptionNotification

Constants

VERSION

Public Class Methods

callback(exception = nil, &block) click to toggle source
# File lib/after_commit_exception_notification.rb, line 4
def self.callback(exception = nil, &block)
  if block
    @block = block
  elsif @block
    @block.call(exception)
  else
    message = ["After commit failed: #{$!}"].concat $!.backtrace
    ActiveRecord::Base.logger.error(message)
    warn message
  end
end