We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think this is a bug, but I'm not sure. I think this PR is the cause of this behaviour: Click
We run strict mode
Our app has the following admin roles:
User.add_role(:admin) # Global User.add_role(:admin, account) # On account instance User.add_role(:admin, survey) # On survey instance
Say we have the follow example:
user_1.add_role(:admin) user_2.add_role(:admin, account.first) user_3.add_role(:admin, survey.first)
has_role?(:admin) returns the following:
user_1.has_role?(:admin) # true user_2.has_role?(:admin) # false user_3.has_role?(:admin) # false
But when I do: User.with_role(:admin) # [user_1, user_2, user_3]
User.with_role(:admin) # [user_1, user_2, user_3]
I would expect: #[user_1]
#[user_1]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think this is a bug, but I'm not sure. I think this PR is the cause of this behaviour: Click
We run strict mode
Our app has the following admin roles:
Say we have the follow example:
has_role?(:admin) returns the following:
But when I do:
User.with_role(:admin) # [user_1, user_2, user_3]
I would expect:
#[user_1]
The text was updated successfully, but these errors were encountered: