-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
Allow Rails 7.2 #5843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we handle the error we get with Ransack 4.2 and above? It doesn't look like there has been any movement on the PR to fix the issue.
That's a very good question. I need to read on the issue first in order to make an opinion. Since I use Ransack 4.2 with great success in several other apps and engines I am not sure why this is an issue in Solidus at all. |
I looked into the problem and I am sure I can replace the custom ransacker with normal ransack. PR upcoming maybe tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for addressing the root cause ❤️
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."
Now that we removed the broken ransacker in previous commit, we can allow Ransack v4.2 - with Rails 7.2 support - again.
We do not use the custom ransacker this was necessary for
Should be fixed by #5853 |
We need at least v3.7 of awesome_nested_set for Rails 7.2 support
Rails 7.2 requires it and 3.0 is out of support anyway.
329a769
to
6ac936c
Compare
Rails 7.2 removed migration_context from ActiveRecord::Base.connection
The file lives in tasks and the projects are in the root folder.
Without that ActiveRecord 7.2 expects a DB table for it.
Now, with Ruby 3.1 we need to address some code style
Needs #5853
We need at least v3.7 of awesome_nested_set for Rails 7.2 support
Summary
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: