Use change manage_relationship without argument in create action.
I have a resource called
User
which has a has_one
relationship with another resource called ImpersonatePermissions
. When I create a new user, I want to also create a new in the impersonate_permissions table. To do that, I believe that I need to use manager_relationship
.
I was able to make this work with a custom change function:
This works, but I was wondering if there is a better/simpler way to do this, I think that probably there is a way to translate this into a change manage_relationship
call, but all the example I found uses an action input argument to set the args, and I don't want that since I don't want the caller to be able to change the arguments.
I tried this but don't seem to work since the function expects a string as the second argument:
Any suggestions?1 Reply
The way that you did it is the best way to do it