Ash FrameworkAF
Ash Framework7mo ago
8 replies
Jimbo Slice

How to set the actor within an action

Hey everyone!

Currently, we have an action that takes a
user
as an argument:
    create :upsert_meeting_prep_action do
      ...

      argument :user, :struct do
        allow_nil? false
      end

      ...
    end

I know that I can use change relate_actor(:user) to set the actor but that would require me to update the function signature everywhere. Is it possible to set the actor within an action using one of the available arguments? Thanks!
Was this page helpful?