ash v1.24.2 Ash.Resource.Dsl.Update.Changes.Change View Source

Link to this section Summary

Functions

A change to be applied to the changeset after it is generated. They are run in order, from top to bottom.

Link to this section Functions

Link to this macro

change(change, opts \\ [])

View Source (macro)

A change to be applied to the changeset after it is generated. They are run in order, from top to bottom.

To implement your own, see Ash.Resource.Change. To use it, you can simply refer to the module and its options, like so:

change {MyChange, foo: 1}

But for readability, you may want to define a function elsewhere and import it, so you can say something like:

change my_change(1)

For destroys, changes are not applied unless soft? is set to true.

Examples

change relate_actor(:reporter)
change {MyCustomChange, :foo}

Arguments

  • :change - The module and options for a change.