Class: JsonApiFilter::FieldFilters::Matcher
- Defined in:
- lib/json_api_filter/field_filters/matcher.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from JsonApiFilter::FieldFilters::Base
Instance Method Details
#predicate ⇒ ActiveRecord_Relation
6 7 8 9 10 11 12 13 |
# File 'lib/json_api_filter/field_filters/matcher.rb', line 6 def predicate values.map do |key, value| scope.where( key_translation(key) => ::JsonApiFilter::ValueParser.parse(value) ) end.reduce(&:merge) end |