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 rails 7.2 #239

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

alpaca-tc
Copy link
Contributor

@alpaca-tc alpaca-tc commented May 30, 2024

The pull request is currently in draft status.
Once the beta release of Rails is replaced by a stable release, I will open the pull request.

related: rails/rails#51726

`_reflect_on_association` is also a private API and will may be broken, but it works
for both String and Symbol, absorbing type differences, so use this one.
By default, only `id` is output, so set `:all` to output all attributes for testing.
related: rails/rails#49765
ar-multitenant expects that #primary_key returns single column instead of composite primary_keys for backward compatibilities.

Previously overwriting #primary_key to return single pk, but since the timing for
writing @primary_key has changed since Rails 7.2, this way is no longer available.
Instead, overwriting `#reset_primary_key`, which handles calculating `@primary_key`.
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.

None yet

1 participant