Ash FrameworkAF
Ash Framework3y ago
5 replies
Blibs

Use `action/1` with more than one action in policies

Right now I'm doing my policies like this:

policy action(:some_action) do
  ...
end

policy action(:another_action) do
  ...
end

...


Sometimes more than one action have the same policies, so I was wondering if there is some option to do something like this:

policy action([:some_action, :another_action]) do
  ...
end
Was this page helpful?