ruby on rails - CanCan skip authorization for some action -


i have problem cancan gem can't solve. in controller have action "confirm" member route "reservations" resource. don't want authorize resource cancan in action in controller:

load_and_authorize_resource except: :confirm 

but have error:

this action failed check_authorization because not authorize_resource. add skip_authorization_check bypass check. 

how can skip authorization proper action in cancan?

i think might work in controller,

skip_authorization_check only: :confirm load_and_authorize_resource except: :confirm 

hope helps!


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -