Ash.Api.update
update
, go back to Ash.Api module for more information.
Specs
update(Ash.Changeset.t(), params :: Keyword.t()) :: {:ok, Ash.Resource.record()} | {:error, term()}
Update a record.
:verbose?
- Log engine operations (very verbose!) The default value isfalse
.:action
- The action to use, either an Action struct or the name of the action:authorize?
- If an actor option is provided (even if it isnil
), authorization happens automatically. If not, this flag can be used to authorize with no user.:stacktraces?
- For Ash errors, can be set to true to get a stacktrace for each error that occured. See the error_handling guide for more. The default value isfalse
.:actor
- If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:return_notifications?
- Use this if you're running ash actions in your own transaction and you want notifications to happen still.
If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is{:ok, result, notifications}
(or{:ok, notifications}
)
To send notifications later, useAsh.Notifier.notify(notifications)
. It sends any notifications that can be sent, and returns the rest. The default value isfalse
.