json_api_toolbox 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_api_toolbox/version.rb +1 -1
- data/lib/renderizable.rb +2 -2
- 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: 710c3ff50ec8bf19092d3c77dfc61873879e9c82
|
4
|
+
data.tar.gz: dbbefba1e47f36704523c847496cd9c78f7be687
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 425af0b5b6f1c0a360516a3942c324767e77040ef0fad696024abcffef60efdaee174fe6b7bb9c92e79d64a70df944a9fc0c0a30c14cad94c41e1e78b508e340
|
7
|
+
data.tar.gz: 8b6178f6b286d0f694dd8c6a8e9eb83f63e54904146b690193488bc7123f8b6adf3b8c6746b3fd118de13d678a01174f879ce5e1a01f514d5564e1eff1f3f938
|
data/lib/renderizable.rb
CHANGED
@@ -13,7 +13,7 @@ module JsonApiToolbox
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def render_object(object)
|
16
|
-
if object.respond_to?(:
|
16
|
+
if object.respond_to?(:errors) && object.errors.any?
|
17
17
|
render_with_errors(object.errors)
|
18
18
|
else
|
19
19
|
render jsonapi: object, include: includes_params
|
@@ -38,7 +38,7 @@ module JsonApiToolbox
|
|
38
38
|
|
39
39
|
# This line exists to exclude from default_includes_params a relationship
|
40
40
|
# with 'versions' (see gem paper_trail)
|
41
|
-
model_relationships.delete(:versions)
|
41
|
+
model_relationships.delete(:versions)
|
42
42
|
|
43
43
|
params.merge!(includes: model_relationships)
|
44
44
|
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.5.
|
4
|
+
version: 0.5.3
|
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-11-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|