Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: require pundit 2.0 #260

Merged
merged 1 commit into from
May 21, 2021
Merged

Fix: require pundit 2.0 #260

merged 1 commit into from
May 21, 2021

Conversation

dgmstuart
Copy link
Contributor

The namespacing feature we're using has a bug which was fixed in Pundit
2.0:

varvet/pundit#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:

[: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:

  varvet/pundit#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:

    [:admin, Widget]

...rather than on the actual record:

    Widget
@dgmstuart dgmstuart mentioned this pull request May 21, 2021
@dgmstuart dgmstuart merged commit 700c189 into master May 21, 2021
@dgmstuart dgmstuart deleted the use-pundit-2 branch May 21, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant