`change manage_relationship(...type: :remove)` not working
I have a
The
I'm a little baffled by this one. Also, if I change the
(this basically just changes
... my test also fails. It seems to remove the subscription from the
Not sure what I'm doing wrong here
many_to_many relationship between Organization and SubscriptionPlan. The Organization has the following two actions:The
:subscribe action seems to work fine. But the :unsubscribe action fails with the following :invalid error:I'm a little baffled by this one. Also, if I change the
manage_relationship options from type: :remove to the following:(this basically just changes
on_no_match from :error to :ignore)... my test also fails. It seems to remove the subscription from the
Organization but not the SubscriptionPlan:Not sure what I'm doing wrong here
Solution
So the mistake I was making was in my
I thought that second parameter was supposed to refer to the relationship defined on the resource that was defining the policy, but it's actually the relationship defined on the resource being referenced in the policy.
accessing_through policy:I thought that second parameter was supposed to refer to the relationship defined on the resource that was defining the policy, but it's actually the relationship defined on the resource being referenced in the policy.
