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
Version: 1.15.0 I have two model: User and Role In ability I can manage all User and I want manage Role
Not work if I write: can :manage, User can :manage, Role, user: { id: User.ids } or { id: User.pluck(:id) }
can :manage, User
can :manage, Role, user: { id: User.ids } or { id: User.pluck(:id) }
Working only if I write: can :manage, User users = User.all users.each do |user| can :manage, Role, user_id: user.id end
users = User.all
users.each do |user|
can :manage, Role, user_id: user.id
end
This is a simple example. For more nested Models it's very difficult with many cicles inside. Please verify and tell me the solution
The text was updated successfully, but these errors were encountered:
Please refer to Stackoverflow for questions. Thanks.
Sorry, something went wrong.
No branches or pull requests
Version: 1.15.0
I have two model: User and Role
In ability I can manage all User and I want manage Role
Not work if I write:
can :manage, User
can :manage, Role, user: { id: User.ids } or { id: User.pluck(:id) }
Working only if I write:
can :manage, User
users = User.all
users.each do |user|
can :manage, Role, user_id: user.id
end
This is a simple example. For more nested Models it's very difficult with many cicles inside.
Please verify and tell me the solution
The text was updated successfully, but these errors were encountered: