1.2.0: Allow to change callbacks action when called outside transaction
Added
-
Allow to change callbacks' behavior when they are called outside transaction:
AfterCommitEverywhere.after_commit(without_tx: :raise) do # Will be executed only if was called within transaction # Error will be raised otherwise end
Available values for
without_txkeyword argument::executeto execute callback immediately:warn_and_executeto print warning and execute immediately:raiseto raise an exception instead of executing
Pull request #18 by [@lolripgg][].