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

Support modifying the accessible_by querying strategy on a per-query basis #675

Merged
merged 2 commits into from
Mar 14, 2021

Conversation

ghiculescu
Copy link
Contributor

See discussion at #668

@ghiculescu ghiculescu changed the title Support modifying the querying strategy on a per-query basis Support modifying the accessible_by querying strategy on a per-query basis Dec 14, 2020
Copy link
Member

@coorasse coorasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@coorasse coorasse merged commit 3e7bc1a into CanCanCommunity:develop Mar 14, 2021
@ghiculescu ghiculescu deleted the strategy-per-query branch July 6, 2022 20:36
@NikosVlagoidis
Copy link

I came across that and noticed that the implementation isn't thread-safe and I would be happy to provide a patch with some guidance. My initial thought was to use thread_mattr_accessor from active_support but this isn't a repo dependency.

Would going with a Thread.current[] variable be reasonable?

@ghiculescu
Copy link
Contributor Author

That sounds like a good idea

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

Successfully merging this pull request may close these issues.

3 participants