sift icon indicating copy to clipboard operation
sift copied to clipboard

Enables easily adding filtering in rails controllers

Results 10 sift issues
Sort by recently updated
recently updated
newest added

Fix of the issue described in #57, that filters by boolean field is not filtering when the field value is false.

needs code review

## Description With a filter like `filter_on :active, type: :boolean` When the `active` field value is `false`, the filter is not applied and the query returns all records with `active`...

Attempting to filter a jsonb array: `filter_on :tags, type: :jsonb` Throws an error: ``` undefined local variable or method `val' for # ``` It looks like this is a simple...

Please check out the README.md changes for the idea. I'm extremely open to feedback. I was motivated to do this as a feature request from @bradleyrzeller There's some significant refactoring...

needs code review

Passing an empty `filters` param causes Brita to raise an exception. **Version:** 0.10.0 **To Reproduce:** Make a request like `/api/my-resource?filters=` or `/api/my-resource?filters` or `/api/my-resource?filters[]` **Result:** ``` undefined method `[]' for...

bug

Date, Datetime, and Time validation is lacking. https://github.com/procore/brita/blob/master/lib/brita/type_validator.rb#L4 It currently matches a very generic range pattern that may lead to a database error when trying to parse an input value....

The sorts are not respecting the order passed by the client when chaining multiple sorts. It appears that sort order is determined by the order in which `sort_on` is declared...

As described in #26 , Sift does not properly handle multiple sorts, because the order in which the sorts are applied to the ActiveRecord collection is determined by the order...

With an empty `filters` param, Sift encounters: "undefined method `[]' for nil:NilClass (NoMethodError filter_params[filter.validation_field] && filter.custom_validate" And trace points to: lib/sift/filter_validator.rb:33 in `has_custom_validation?' Similar errors when `filters` is something else....