-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Remove custom Ransack predicates that were MetaSearch backports #8010
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
Merged
Conversation
This file contains hidden or 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
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #8010 +/- ##
==========================================
+ Coverage 99.09% 99.14% +0.05%
==========================================
Files 197 196 -1
Lines 4949 4939 -10
==========================================
- Hits 4904 4897 -7
+ Misses 45 42 -3
☔ View full report in Codecov by Sentry. |
0a3b904
to
0b7803b
Compare
This closes #3511 and is updated branch with no merge conflicts. Instead of fixing each conflict, since the original PR is very old, started from scratch making each change and running the tests. This removes backports for a gem that was deprecated in favor of ransack. We want to reduce our footprint and just rely on ransack's defaults and docs.
0b7803b
to
9145186
Compare
thibaudgg
added a commit
to csa-admin-org/csa-admin
that referenced
this pull request
Jul 28, 2023
difernandez
added a commit
to platanus/activeadmin_addons
that referenced
this pull request
Aug 3, 2023
Mainly, the 'contains' predicate, that was used as default in some components. These predicates were removed from activeadmin v3, since they were backports. More info here activeadmin/activeadmin#8010
6 tasks
difernandez
added a commit
to platanus/activeadmin_addons
that referenced
this pull request
Aug 3, 2023
Mainly, the 'contains' predicate, that was used as default in some components. These predicates were removed from activeadmin v3, since they were backports. More info here activeadmin/activeadmin#8010
difernandez
added a commit
to platanus/activeadmin_addons
that referenced
this pull request
Aug 23, 2023
Mainly, the 'contains' predicate, that was used as default in some components. These predicates were removed from activeadmin v3, since they were backports. More info here activeadmin/activeadmin#8010
difernandez
added a commit
to platanus/activeadmin_addons
that referenced
this pull request
Aug 23, 2023
Mainly, the 'contains' predicate, that was used as default in some components. These predicates were removed from activeadmin v3, since they were backports. More info here activeadmin/activeadmin#8010
xhero
added a commit
to rism-digital/muscat
that referenced
this pull request
Jun 17, 2024
naveed-ahmad
added a commit
to TarteelAI/quranic-universal-library
that referenced
this pull request
Aug 7, 2024
zWOX53b4FRS
pushed a commit
to slamesbga/signal-wiki
that referenced
this pull request
Mar 12, 2025
quitetarches
pushed a commit
to sbcandspartan/backpacking
that referenced
this pull request
Mar 26, 2025
tagliala
added a commit
that referenced
this pull request
May 1, 2025
This change introduces a custom `active_admin` I18n scope for predicate translations, allowing ActiveAdmin to override Ransack's defaults while still falling back to them when necessary. It addresses discussions about improving localization (#8699) and resolves potential leftover logic from earlier implementations (#8010)
tagliala
added a commit
that referenced
this pull request
May 3, 2025
This change introduces a custom `active_admin` I18n scope for predicate translations, allowing ActiveAdmin to override Ransack's defaults while still falling back to them when necessary. It addresses discussions about improving localization (#8699) and resolves potential leftover logic from earlier implementations (#8010)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes backports for a gem (MetaSearch) that was deprecated in favor of Ransack over a decade ago. We want to reduce our footprint and just rely on Ransack's defaults and docs. This will be part of a major ActiveAdmin release since it's a breaking change alongside #8009. Closes #3511
Required changes to update:
Any filters or hard coded URL paths using filter parameters that use the predicates listed below on the left, now have to be replaced with the value on the right:
_equals
->_eq
_contains
->_cont
_starts_with
->_start
_ends_with
->_end
_greater_than
->_gt
_less_than
->_lt
_gteq_datetime
->_gteq
_lteq_datetime
->_lteq
Behavioral changes
When filtering by range with a datetime column (e.g. created_at), a custom predicate would modify the "to" value so it was always a day after in the generated database query. So if the "from" and "to" filters had the same supplied date, e.g. 2023-07-11, the query would query data in a 24 hour range.
Now that the custom predicate is removed that behavior is not present. To achieve a similar result with this change, the supplied "to" filter value has to be the next day. So going with the earlier example, the "from" is 2023-07-11 and the "to" would now have to be 2023-07-12 instead.