-
Below is a simplified version of a concern I use in my Controllers.
When I upgraded to Rails 7, I got the following error:
The issue disappears if I use |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
No, With the limited information provided my first guess is that you might be using an old version of Pundit? |
Beta Was this translation helpful? Give feedback.
-
Thanks. I am using the latest (v2.3.1). The pundit gem is included in one of our engine gems so let me keep digging to see if something isn't set up correctly on our end. |
Beta Was this translation helpful? Give feedback.
-
I didn't notice the hint in the error, but there's one:
I'm not sure why |
Beta Was this translation helpful? Give feedback.
-
Sorry for the late response @Burgestrand and thanks for the suggestion. Turns out I wasn't using the latest version of Pundit. I had multiple gems requiring pundit and one of them was still on an older version. I have it working with |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying, that's good news! |
Beta Was this translation helpful? Give feedback.
Sorry for the late response @Burgestrand and thanks for the suggestion.
Turns out I wasn't using the latest version of Pundit. I had multiple gems requiring pundit and one of them was still on an older version. I have it working with
include Pundit::Authorization
.