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

Fix Active Record encryption not picking up encryption settings with eager-loading #48577

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

jorgemanrubia
Copy link
Contributor

@jorgemanrubia jorgemanrubia commented Jun 26, 2023

This deals with a problem where, when eager-loading is enabled, Active Record fails to pick up settings affecting encryption schemes.

The solution here is to resolve encryption schemes lazily, when the attribute type is used.

Follow-up to #48530

Fixes #48204 (comment)

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.

@jorgemanrubia jorgemanrubia changed the title Resolve encryption schemes lazily, when attribute type is used Fix Active Record encryption not picking up encryption settings when eager-loading is enabled Jun 26, 2023
@jorgemanrubia jorgemanrubia changed the title Fix Active Record encryption not picking up encryption settings when eager-loading is enabled Fix Active Record encryption not picking up encryption settings with eager-loading Jun 26, 2023
…eager-loading

This deals with a problem where, when eager-loading is enabled, Active Record fails to pick up settings affecting encryption schemes.

The solution here is to resolve encryption schemes lazily, when the attribute type is used.

Follow-up from rails#48530

Closes rails#48204 (comment)
@dhh dhh merged commit 4f36572 into rails:main Jun 26, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Rails 7.1 alpha breaks ActiveRecord attribute encryption (deterministic)
2 participants