I have an action like below where the accepted argument is a map
actions do
create :generate_session_token do
argument :user, :map
end
end
Assuming argument :user
map has an :id
key, how do I access it inside the set_attribute
? Obviously the following won’t work because arg(:user)
gets expanded to a tuple {:_arg, :user}
and I can’t get the :id
field here.
change set_attribute(:user_id, arg(:user).id) # Wont work