Closed dgmstuart closed 3 years ago
The namespacing feature we're using has a bug which was fixed in Pundit 2.0:
https://github.com/varvet/pundit/pull/529
The namespace is required to look up the policy, but without this fix it gets passed as the record in the policy, so the policy is trying to do logic on an array like:
record
[:admin, Widget]
...rather than on the actual record:
Widget
The namespacing feature we're using has a bug which was fixed in Pundit 2.0:
https://github.com/varvet/pundit/pull/529
The namespace is required to look up the policy, but without this fix it gets passed as the
record
in the policy, so the policy is trying to do logic on an array like:...rather than on the actual record: