-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Missing reasons in all_details
#278
Comments
I'm investigating the source code and I'm starting to understand my mistakes : I confused the details & the reasons. The documentation seems (to me) a little ambiguous because it explains that to access the reasons you should call But when you call |
I've made a first PR to update documentation by adding example about I keep thinking that differences between p ex.result.reasons.to_h #=> { stage: [:show?] }
p ex.result.reasons.to_h #=> { stage: [{show?: {title: "Onboarding"}] } See: 5a003d9 |
I agree. That's a result of incorporating various feature requests into a design that didn't expect that 🙂 (And that's one of the reasons why we don't have 1.0—I'm still not sure how to resolve this confusion).
I'm open to it. Anything that could help other users worth being mentioned in the docs. |
Tell us about your environment
Ruby Version: 3.3.4
Rails Version: 7.1.4.1
Action Policy Version: 0.7.1
Reproduction Script:
What did you do? / What did you expect to happen?
I would like to use the
all_details
method as described in documentation to catch unauthorized exception and return the appropriate status :What actually happened?
all_details
seems to exclude some reasons.The text was updated successfully, but these errors were encountered: