I have a helper called "allowed_to?" which I use instead of permitted_to? so I can check whether the current_user is impersonating another user.
I've noticed that permitted_to? will return true from a helper even when the answer is false, and, when called from the view on the same request, will return false.
Any idea where this discrepancy might be coming from?
I have a helper called "allowed_to?" which I use instead of permitted_to? so I can check whether the current_user is impersonating another user.
I've noticed that permitted_to? will return true from a helper even when the answer is false, and, when called from the view on the same request, will return false.
Any idea where this discrepancy might be coming from?