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

Merged
merged 7 commits into from
Aug 23, 2024
Merged

Commits on Aug 21, 2024

  1. Add rails 7.2 to Appraisals

    alpaca-tc committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    2f967a3 View commit details
    Browse the repository at this point in the history
  2. The key of _reflections is a symbol since Rails 7.2.

    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.
    alpaca-tc committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    7e9538a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    01808bf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    11b8af8 View commit details
    Browse the repository at this point in the history
  5. Introduced #attributes_for_inspect in Rails 7.2

    By default, only `id` is output, so set `:all` to output all attributes for testing.
    related: rails/rails#49765
    alpaca-tc committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    b81b63b View commit details
    Browse the repository at this point in the history
  6. Overrides #reset_primary_key to modify @primary_key.

    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`.
    alpaca-tc committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    ff19aab View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. fix rubocop

    alpaca-tc committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    756e7d3 View commit details
    Browse the repository at this point in the history