mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
chore: add some clarification
This commit is contained in:
parent
84f8d6d942
commit
405093eb1a
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ For more information, see the documentation for `Ash.Resource.Change.OptimisticL
|
||||||
2. If you want optimistic locking to occur for _specific actions_:
|
2. If you want optimistic locking to occur for _specific actions_:
|
||||||
1. Add `change optimistic_lock(:version)` to those specific actions
|
1. Add `change optimistic_lock(:version)` to those specific actions
|
||||||
3. If you want optimistic locking to occur for _all actions_:
|
3. If you want optimistic locking to occur for _all actions_:
|
||||||
1. Add a global `changes` block, if you do not have one
|
1. Add a global `changes` block to the resource, if you do not have one
|
||||||
2. Add `change optimistic_lock(:version), on: [:create, :update, :destroy]`
|
2. Add `change optimistic_lock(:version), on: [:create, :update, :destroy]`
|
||||||
3. Note that we list the action types, because `:destroy` is not in the list of action types a change runs on by default.
|
3. Note that we list the action types, because `:destroy` is not in the list of action types a change runs on by default.
|
||||||
4. If you want to apply optimistic locking to _many but not all actions_:
|
4. If you want to apply optimistic locking to _many but not all actions_:
|
||||||
1. Add a global `changes` block, if you do not have one
|
1. Add a global `changes` block to the resource, if you do not have one
|
||||||
2. Add `change optimistic_lock(:version), where: action_is([:list, :of, :actions])`
|
2. Add `change optimistic_lock(:version), where: action_is([:list, :of, :actions])`
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
Loading…
Reference in a new issue