Ignoring a relationship on specific update actions
I have an update action that toggles just a flag on a CrewMember resource. CrewMember's have many Weapons, which are set up using
change manage_relationship(:weapons, type: :direct_control). I created a new update action called set_leader, which can be called in scopes of the application where the full list of Weapons is not loaded. Is there a way to set this action to not wipe out the list of Weapons when only %{ "is_leader" => true } is passed as a param?Solution:Jump to solution
that's not calling your
set_leader action, that's calling the update action4 Replies
if the
set_leader action doesn't call that manage_relationship, then it won't update the weapon listOdd, that's what I thought, but it seems to be. I do have an after action but I don't think that's the culprit either.
Solution
that's not calling your
set_leader action, that's calling the update actionOh duh! Thank you so much!