Filter a change by action_type

I have a change that I want to apply to all the resource actions that are of type create, update and destroy. Looking at the Ash.Resource.Validation.Builtins I can only see the action_is/1 option which allows me to specific an action by name, but I can't find any action_type/1 options or something similar. Is that not possible?
2 Replies
ZachDaniel
ZachDaniel3y ago
the on option lets you do that
changes do
change change(), on: [:create, :update, :destroy]
end
changes do
change change(), on: [:create, :update, :destroy]
end
The default value for on is [:create, :update]
Blibs
BlibsOP3y ago
Awsome! I was sure that there had to be a way, I only glanced over that option and focude in the where one hahaha. Thanks

Did you find this page helpful?