Skip to content

0.10.0-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@amayer171 amayer171 released this 07 May 21:06
· 113 commits to master since this release
f12fbc1

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.