Exposing data of the managed relationship
I created an action on Resource1 that creates another Resource2. Resource2 is created correctly using
manage_relationship
but I need to return the generated id for Resource2
and I have not found a way to get that information. Is it possible to access the return values from the action called by manage_relationship
? If they are accesible I could put them into metadata4 Replies
You could do an after_action hook that looks at the relationship and sets the id from the new value of the relationship?
Ah, seems I looked in the wrong place again. I did a quick test and if I saw this correctly the relationship will only hold the newly created data on a has_many realtionship, not all related resources. This would work perfectly for me, just wanting to make sure.
I don't actually recall if we ensure the relationship is loaded after editing it
KK, gonna take a look at the code and see if I can figure this out myself.