json_api_toolbox 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/json_api_toolbox/version.rb +1 -1
- data/lib/renderizable.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79da90324606331c68b49af3debae0e39e9fa4b0
|
4
|
+
data.tar.gz: a966e83e52ceea214541ae4fcc326c0087a8a3f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21e5ca55dd7b9ecad49b186c0016e4befbfd676fd059a4f85396cf36cd6a4817d2b34be06c3ffc9bc05a72c36f4b5a32605819adc693590359fcf9d2ad55800
|
7
|
+
data.tar.gz: c93f4f8ceaaec843ad384ddf1a781b5245b6091a497af6386a123b12ae9d934f6d4f8ac317712855bd7c61910e53c0c4ca9cdafa6197270c5587828aaeb90aa8
|
data/CHANGELOG.md
CHANGED
data/lib/renderizable.rb
CHANGED
@@ -8,7 +8,7 @@ module JsonApiToolbox
|
|
8
8
|
else
|
9
9
|
renderization =
|
10
10
|
{ jsonapi: object, include: includes_params }.merge(options)
|
11
|
-
render(renderization
|
11
|
+
render(renderization.merge(build_meta_data(object)))
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -52,6 +52,8 @@ module JsonApiToolbox
|
|
52
52
|
def build_meta_data(objects)
|
53
53
|
if objects.respond_to?(:count)
|
54
54
|
{ meta: { 'total-count' => objects.count } }
|
55
|
+
else
|
56
|
+
{}
|
55
57
|
end
|
56
58
|
end
|
57
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_api_toolbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adriano Bacha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|