Incrementing an attribute
What I have been doing is this:
I did speculatively try this with
Is there another way to do this?
I did speculatively try this with
expr as well: Is there another way to do this?
exprchange fn changeset, opts ->
attempts = Ash.Changeset.get_attribute(changeset, :attempts)
Ash.Changeset.change_attribute(changeset, :attempts, attempts + 1)
endchange set_attribute(:attempts, expr(attr(:attempts) + 1)