You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/03-code-internals/19-service-objects.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,8 @@ This step will run coercions and validations defined in the provided block. If t
130
130
131
131
This step is a bit special, as it will wrap any other steps defined in its block inside a SQL transaction.
132
132
133
+
Any step that fails inside the transaction block will cause a rollback of the transaction.
134
+
133
135
### `try`
134
136
135
137
This step will catch exceptions raised by the steps defined in its block. Specific exception classes can be provided if you don’t want to automatically catch all exceptions.
@@ -375,7 +377,7 @@ The step will fail if the policy returns a falsy value. Its result object can be
375
377
376
378
### `transaction(&block)`
377
379
378
-
This step is a bit special as its only purpose is to wrap other steps inside a SQL transaction. It cannot fail by itself.
380
+
This step is a bit special as its only purpose is to wrap other steps inside a SQL transaction. It cannot fail by itself but if a step fails inside the transaction block, the transaction will rollback.
0 commit comments