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

Allow Rails 7.2 #5843

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Allow Rails 7.2 #5843

wants to merge 11 commits into from

Commits on Sep 12, 2024

  1. Replace custom product ransacker with association

    We introduced a custom Ransacker to allow filtering producs by
    their variants option values in the new admin interface.
    
    This ransacker is broken in latest Ransack v4.2 and overly
    complicated.  By introducing a option_values association to
    products, that does the same join over variants_including_master
    and their distinct option_values we can use normal ransack search.
    
    Quoting the Ransack documentation:
    
    > "Ransackers, like scopes, are not a cure-all. Many use cases can be better solved with a standard Ransack search on a dedicated database search field, which is faster, index-able, and scales better than converting/ransacking data on the fly."
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    d3b9db3 View commit details
    Browse the repository at this point in the history
  2. Allow Ransack 4.2 again

    Now that we removed the broken ransacker in previous commit,
    we can allow Ransack v4.2 - with Rails 7.2 support - again.
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    d730d95 View commit details
    Browse the repository at this point in the history
  3. Remove Ransack patch

    We do not use the custom ransacker this was necessary for
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    ae69534 View commit details
    Browse the repository at this point in the history
  4. Allow Rails 7.2

    We need at least v3.7 of awesome_nested_set for Rails 7.2 support
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    60ae8dd View commit details
    Browse the repository at this point in the history
  5. Require at least Ruby 3.1

    Rails 7.2 requires it and 3.0 is out of support anyway.
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    69088e2 View commit details
    Browse the repository at this point in the history
  6. Fix pending migration check for Rails 7.2

    Rails 7.2 removed migration_context from ActiveRecord::Base.connection
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    6a0687f View commit details
    Browse the repository at this point in the history
  7. Fix testing locally

    The file lives in tasks and the projects are in the root
    folder.
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a5637df View commit details
    Browse the repository at this point in the history
  8. Mark Dummy App's ApplicationRecord as abstract class

    Without that ActiveRecord 7.2 expects a DB table
    for it.
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    3da3a6c View commit details
    Browse the repository at this point in the history
  9. Rubocop: Autocorrect

    Now, with Ruby 3.1 we need to address some code style
    tvdeyen committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    edbb628 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b314c27 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    64e09b7 View commit details
    Browse the repository at this point in the history