From e282754179dc24c8bb8ea0089d2328df8567144a Mon Sep 17 00:00:00 2001 From: Quentin de Metz Date: Mon, 5 Feb 2024 16:41:22 +0100 Subject: [PATCH] document prepend option in README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1603aa7..b83325e 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Will be executed right after transaction in which it have been declared was roll If called outside transaction will raise an exception! -Please keep in mind ActiveRecord's [limitations for rolling back nested transactions](http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html#module-ActiveRecord::Transactions::ClassMethods-label-Nested+transactions). See [`in_transaction`](#in_transaction) for a workaround to this limitation. +Please keep in mind ActiveRecord's [limitations for rolling back nested transactions](http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html#module-ActiveRecord::Transactions::ClassMethods-label-Nested+transactions). See [`in_transaction`](#in_transaction) for a workaround to this limitation. ### Available helper methods @@ -139,7 +139,7 @@ class ServiceObjectBtw end ``` -Our service object can run its database operations safely when run in isolation. +Our service object can run its database operations safely when run in isolation. ```rb ServiceObjectBtw.new.call # This opens a new #transaction block @@ -195,6 +195,8 @@ end - `:warn_and_execute` to print warning and execute immediately - `:raise` to raise an exception instead of executing +- `prepend` puts the callback at the head of the callback chain, instead of at the end. + ### FAQ #### Does it works with transactional_test or DatabaseCleaner