lib/granite/action/transaction_manager.rb
# Adds a block or listener object to be executed after finishing the current transaction.
# Callbacks are reset after each transaction.
# @param [Object] listener an object which will receive `run_callbacks(:commit)` after transaction committed
# @param [Proc] block a block which will be called after transaction committed
Adds a block or listener object to be executed after finishing the current transaction.
Callbacks are reset after each transaction.
Adds a block or listener object to be executed after finishing the current transaction . Callbacks are reset after each transaction .
def after_commit(listener = nil, &block)
          callback = listener || block
          fail 'Block or object is required to register after_commit hook!' unless callback
          transactions_stack.add_callback callback
        end
def after_commit ( listener = nil , & block ) callback = listener || block fail 'Block or object is required to register after_commit hook!' unless callback transactions_stack . add_callback callback end
Adds a block or listener object to be executed after finishing the current transaction.
Adds a block or listener object to be executed after finishing the current transaction .
listener
block
block a block which will be called after transaction committed
block a block which will be called after transaction committed