Skip to content
Rails: Get notified when an after_commit block blows up
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
gemfiles
lib
spec
.travis.yml
Gemfile
Gemfile.lock
MIT-LICENSE
Rakefile
Readme.md
after_commit_exception_notification.gemspec

Readme.md

Rails: Get notified when an after_commit block blows up

This gem is deprecated since rails 4.2 / 5 now have the correct behavior.

config.active_record.raise_in_transactional_callbacks = true

Install

gem install after_commit_exception_notification

Usage

require 'after_commit_exception_notification' # by default prints to STDERR and ActiveRecord::Base.logger

AfterCommitExceptionNotification.callback do |exception|
  ErrorService.report("after_commit crashed", exception)
end

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status

Something went wrong with that request. Please try again.