Remove custom Ransack predicates that were MetaSearch backports#8010
Merged
Conversation
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
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
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->_lteqBehavioral 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.