Module: AfterCommitExceptionNotification
- Defined in:
- lib/after_commit_exception_notification.rb,
lib/after_commit_exception_notification/version.rb
Defined Under Namespace
Modules: CommittedWithNotification
Constant Summary collapse
- VERSION =
"0.2.0"
Class Method Summary collapse
Class Method Details
.callback(exception = nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# 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 = ["After commit failed: #{$!}"].concat $!.backtrace ActiveRecord::Base.logger.error() warn end end |