Skip to content
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

improve documentation for has_cached_role? #595

Open
jjb opened this issue Sep 28, 2023 · 0 comments
Open

improve documentation for has_cached_role? #595

jjb opened this issue Sep 28, 2023 · 0 comments

Comments

@jjb
Copy link
Contributor

jjb commented Sep 28, 2023

Hi - thanks for a great project!

The docs for has_cached_role? suggest that it might sometimes fail

my experiments with code similar to what's shown in the readme do not reproduce the problem

here, foo is a real role my system uses, and does_not_exist is not used and is here just a placeholder in an attempt to generate an AR relation without the roles preloaded

the results of has_cached_role? are accurate - preloading doesn't seem to be an issue

User.without_role(:does_not_exist).map{|u| u.has_cached_role?(:foo) }

maybe this behavior has been improved since the feature and docs were introduced? #369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant