You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One user might have multiple roles, when I tried to find those users that only has assistant role but does not have admin role, I found that I fail to get them with
User.with_role(:assistant).without_role(:admin)
Wrong result
User.without_role(:admin).with_role(:assistant)
Correct result
thanks
The text was updated successfully, but these errors were encountered:
vshy108
changed the title
without_role is not working as expected.
without_role is not working as expected if used to filter result of with_role.
Oct 5, 2016
version 5.1.0
One user might have multiple roles, when I tried to find those users that only has assistant role but does not have admin role, I found that I fail to get them with
User.with_role(:assistant).without_role(:admin)
and has TRUE result for following statement
User.with_role(:assistant).without_role(:admin).first.has_role?(:admin)
The result of following lines is different
thanks
The text was updated successfully, but these errors were encountered: