I have problem with CanCan gem which I can't solve. In my controller I have action "confirm" which is a member route for "reservations" resource. I don't want to authorize resource by CanCan in this action so I do something like that in controller:
load_and_authorize_resource except: :confirm
But now I have error:
This action failed the check_authorization because it does not authorize_resource. Add skip_authorization_check to bypass this check.
How can I skip authorization for proper action in CanCan?
I think something like this might work in your controller,
skip_authorization_check only: :confirm
load_and_authorize_resource except: :confirm
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With