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
We can configure index actions in ability class like following
can :index, [Product], brand_id: allowed_brand_ids_from_session
But how I can test it in Rspec as you can only access allowed products coming from session Why we dont we allow query params in be_able_to matchers
This don't cover actuall implementation of our ability. Because at the moment we can only pass model name only.
expect(subject).to be_able_to(:index, Product)
we can allow some thing like .with to also mention query params that we pass in actuall ability class.
.with
expect(subject).to be_able_to(:index, Product).with(brand_id: some_brand_ids)
Tell us what happens instead
Rails version:
Ruby version:
CanCanCan version
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
We can configure index actions in ability class like following
But how I can test it in Rspec as you can only access allowed products coming from session
Why we dont we allow query params in be_able_to matchers
This don't cover actuall implementation of our ability. Because at the moment we can only pass model name only.
Expected behavior
we can allow some thing like
.with
to also mention query params that we pass in actuall ability class.Actual behavior
Tell us what happens instead
System configuration
Rails version:
Ruby version:
CanCanCan version
The text was updated successfully, but these errors were encountered: