Closed ghost closed 2 years ago
@BenjaminMINK sorry for the delay replying to this one. Have you considered enabling the expressions when filtering? https://github.com/stas/jsonapi.rb#sorting-using-expressions
Feel free to reopen this if you have questions ;)
Hello,
Expected Behavior
Field attributes containing/ending with any of the custom predicates added by the gem should extract the correct field, and returns the filtered records.
Actual Behavior
Using field attributes that can contains or ends with
_max
(and all other custom predicates added by the gem: min, max, avg, sum and count) likebar_abs_max
,bar_abs_min
are mishandled, the gem is extracting as fieldbar_abs
, so using filter likebar_abs_max_gteq
does not work: it returns all records.Steps to Reproduce the Problem
Specifications
A quick solution would be to give the developer the choice to enable or not these custom predicates