jsonapi-scopes 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/jsonapi/scopes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b5d90e91ab01588a7b2611dc69b9646cc682a70c4cb13c5869b13f64d6204a
|
4
|
+
data.tar.gz: 5eaf3f10e79b2f994ef08e079b3a85d4f0e366b6d57fbf67c42acff5ca92b9a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f80b35cf6f1260e91f46562b8327104d7b1e64f355031d9255ab04feaa8fe34e3a4102060c02614d1c7e21b9957d791e88d903da1c59c62b8ccb207da6d8f185
|
7
|
+
data.tar.gz: beb2ab7e3c7894924790d9fb99447add0030946f3ee32f02c52002ab1b6048df19f263b1b08252055f61b1e17e1888a7b1864247cb8273334e54d32d44ef6862
|
data/README.md
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
[![](https://img.shields.io/github/license/guillaumebriday/jsonapi-scopes.svg)](https://github.com/guillaumebriday/jsonapi-scopes)
|
5
5
|
|
6
6
|
# Jsonapi::Scopes
|
7
|
-
This gem
|
7
|
+
This gem provides a set of methods which allow you to include, filter and sort an ActiveRecord relation based on a request. It's build to be a simple, robust and scalable system. This gem follows the [JSON:API specification](https://jsonapi.org/) as closely as possible.
|
8
|
+
|
9
|
+
This gem is also an unopinionated solution to help you follow the `JSON:API specification`. It does not take care how you want to handle the results. It is a seamless integration in your Rails application and not full library.
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
Add this line to your application's Gemfile:
|
@@ -57,7 +59,7 @@ You can specify multiple matching filter values by passing a comma separated lis
|
|
57
59
|
But `/contacts?filter[last_name]=Wayne` will be completely ignored.
|
58
60
|
|
59
61
|
### Sorting
|
60
|
-
The gem add `default_sort` and `sortable_fields` methods to control sort options.
|
62
|
+
The gem add `default_sort` and `sortable_fields` methods to control sort options. They can be overridden in controllers.
|
61
63
|
|
62
64
|
```ruby
|
63
65
|
class Contact < ActiveRecord::Base
|