module ActiveRecord::Transactions::ClassMethods

def after_rollback(*args, &block)

Please check the documentation of #after_commit for options.

This callback is called after a create, update, or destroy are rolled back.
def after_rollback(*args, &block)
  set_options_for_callbacks!(args)
  set_callback(:rollback, :after, *args, &block)
end