I have in cancancan abilities can(:manage, User, id: user.id)
When user opens own profile, then can? :update, @user
in the UsersController#show returns correctly true, but in the show view it returns false.
Does anyone know what causes this inconsistency?
cancancan 3.1, rails 6.0.3.4
Ok, I solved it. The problem was I called
can?
on decorator and it doesn't work.can? :update, @user.object
works fine.