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

Use RequestStore instead of Thread.current for thread-safe requests. #669

Merged
merged 5 commits into from
Apr 20, 2023
Merged

Conversation

tiagocassio
Copy link
Contributor

Related to: #601 and inspired by: paper-trail-gem/paper_trail@e28d29e

@danielmorrison
Copy link
Member

This is good. Thanks!

Copy link
Member

@danielmorrison danielmorrison left a comment

Choose a reason for hiding this comment

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

Looks like the tests need some work.

@danielmorrison danielmorrison merged commit 342734c into collectiveidea:main Apr 20, 2023
@mroach
Copy link

mroach commented Apr 26, 2023

What's the motivation with using another gem as opposed to ActiveSupport::CurrentAttributes? My understanding of CurrentAttributes is that it's designed specifically to deal with this problem, and it's already available due to the indirect dependency via ActiveRecord.

@danielmorrison
Copy link
Member

I like the idea of moving to ActiveSupport::CurrentAttributes. I'd love to see a PR with that.

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