Skip to content

Releases: procore/sift

0.16.0

16 Mar 18:49
b13bccc
Compare
Choose a tag to compare

Adds a tap method to filter_on to support mutating filter values

0.13.0-beta

24 Mar 23:09
a801267
Compare
Choose a tag to compare
0.13.0-beta Pre-release
Pre-release

This is a beta release to add support for inheritance of Sift filters & sorts.

For example:

def PostsController < ApplicationController
  filter_on :id, type: :integer
  sort_on :title, type: :string
end

def PostsChild < ThingController
  sort_on :title, internal_name: :body, type: :string
end

The PostsChild resource inherits the id filter, and the title sort has been overridden to sort by body instead.

0.10.0-beta

07 May 21:06
f12fbc1
Compare
Choose a tag to compare
0.10.0-beta Pre-release
Pre-release

This is a beta release as it adds support for new integer filter semantics. After it has been exercised fully it can be upgraded to a production release.

Adds support for integer filtering of JSON arrays to facilitate filtering by two or more values.

Previously you would send the following URL params in order to filter by the ids 1 and 2:
?filters[id][]=1&filters[id][]=2. When URI encoded this would expand to: ?filters%5Bid%5D%5B%5D=1&filters%5Bid%5D%5B%5D=2. On the Rails server side this would be parsed into a hash "filters" => { "id" => ["1", "2"] }.

This has a lot of duplicate characters and is not intuitive.

In this release we support the following format (currently only for int type filters):
?filters[id]=[1,2]. When URI encoded this expands to: ?filters%5Bid%5D=%5B1,2%5D. On the Rails server side this would be parsed into a hash "filters" => { "id" => "[1,2]" }. Brita will parse this string as a JSON array and filter as expected.