-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle empty result set in variants_option_values ransacker
Updated the `variants_option_values` ransacker to handle scenarios where there are no matching product IDs. By leveraging the `.presence` method, we ensure that the ransacker returns `nil` instead of an empty array when there are no results. This prevents potential SQL syntax errors across different database systems.
- Loading branch information
1 parent
272f62d
commit f9e1ddf
Showing
2 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters