lib/ledgerizer/extensions/locking_extensions.rb
# Execute the given block within a database transaction, and retry the
# transaction from the beginning if a RestartTransaction exception is raised.
Execute the given block within a database transaction, and retry the
transaction from the beginning if a RestartTransaction exception is raised.
Execute the given block within a database transaction and retry the transaction from the beginning if a RestartTransaction exception is raised .
def restartable_transaction(&block)
      transaction(&block)
    rescue ActiveRecord::RestartTransaction
      retry
    end
def restartable_transaction ( & block ) transaction ( & block ) rescue ActiveRecord :: RestartTransaction retry end
Execute the given block within a database transaction, and retry the
transaction from the beginning if a RestartTransaction exception is raised.
Execute the given block within a database transaction and retry the transaction from the beginning if a RestartTransaction exception is raised .
block