mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
docs: Fix an error in the changeset action lifecycle example (#1402)
This commit is contained in:
parent
05feea14ef
commit
986d6e6467
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ defmodule Ash.Changeset do
|
|||
# execute code in the transaction, before the data layer is called
|
||||
|> Ash.Changeset.before_action(fn changeset -> changeset end)
|
||||
# execute code in the transaction, after the data layer is called, only if the action is successful
|
||||
after_action(fn changeset, result -> {:ok, result} end)
|
||||
|> Ash.Changeset.after_action(fn changeset, result -> {:ok, result} end)
|
||||
# execute code after the transaction, both in success and error cases
|
||||
|> Ash.Changeset.after_transaction(fn changeset, success_or_error_result -> success_or_error_result end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue