jsonapi-scopes 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/lib/jsonapi/scopes/filters.rb +2 -0
- data/lib/jsonapi/scopes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbd3c67cc76780a390bc9c1e7208cc1d5bc034dcc0f59805837214fe43a3cd6d
|
4
|
+
data.tar.gz: 606d6ac99828abca9b7a8e0a47f7933b52920ca7782733f9cff9a8f5c06dc116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9107728d745f6621bf75723bf72eb6888384545c2e81b905c4eff00139f372c6695ec7f944b13fee3df149387902729ed616161592980b3d1c5eac17aa6a2b51
|
7
|
+
data.tar.gz: ff19b9dc96b11ec88fe902cc0861a3fd387623820c49c85251727ec74a38c2c94d18459bb178adae222e247408ff6c8410f45c25421d86511df4541fd7bbcb9d
|
data/README.md
CHANGED
@@ -50,7 +50,9 @@ class ContactsController < ApplicationController
|
|
50
50
|
end
|
51
51
|
```
|
52
52
|
|
53
|
-
Then you can hit `/contacts?filter[first_name]=Bruce` to filter contacts where the
|
53
|
+
Then you can hit `/contacts?filter[first_name]=Bruce` to filter contacts where the first name exactly match `Bruce`.
|
54
|
+
|
55
|
+
You can specify multiple matching filter values by passing a comma separated list of values: `/contacts?filter[first_name]=Bruce,Peter` will returns contacts where the first name exactly match `Bruce` or `Peter`.
|
54
56
|
|
55
57
|
But `/contacts?filter[last_name]=Wayne` will be completely ignored.
|
56
58
|
|
@@ -96,5 +98,12 @@ You can even combine multiple sort `/contacts?sort=lastname,-firstname`
|
|
96
98
|
## Contributing
|
97
99
|
Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.
|
98
100
|
|
101
|
+
## Credits
|
102
|
+
|
103
|
+
Inspired by:
|
104
|
+
|
105
|
+
+ [https://github.com/stefatkins/rails-starter-api](https://github.com/stefatkins/rails-starter-api)
|
106
|
+
+ [https://github.com/cerebris/jsonapi-resources](https://github.com/cerebris/jsonapi-resources)
|
107
|
+
|
99
108
|
## License
|
100
109
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-scopes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Briday
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|