Hi,
I’m learning Ash and I’m really enjoying my journey so far! The framework is awesome, and the documentation is pretty thorough. Thank you @zachdaniel!
I have a quick question: is there a shortcut for transforming an attribute, e.g. for the code below?
change fn changeset, _ ->
Ash.Changeset.change_attribute(
changeset,
:adapter,
to_string(Ash.Changeset.get_attribute(changeset, :adapter))
)
end
I can of course roll out my own macro
transform :adapter &to_string/1
that will expand to the code above, but I’m curious if there a built-in shortcut already?
The context is that I want to do my own cleanup of the incoming data in an e.g. :create
action. Am I approaching this correctly?