standardapi 1.0.20 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8efee4c4e9e7dc0b224b60a46f793a7484534b03
4
- data.tar.gz: bfbe121a41e3e3bc7b26674012c2f79e07955ad0
3
+ metadata.gz: ef0aa98997ab3c271fa9882316baea8f8938055e
4
+ data.tar.gz: 804d221520ba66b22af9b0bb782b74008caff663
5
5
  SHA512:
6
- metadata.gz: fc900a2e9e417ae3a5c3d3067c5fb833e83ff647f9f7433a2b443c1c458c12ebf5e653e4414155bdb798e7df397bcd43c59e9935fde5afcc38eff12e50e1282c
7
- data.tar.gz: ea1883e5531ebb73ee3973002165dc714e0a19c89a4d984a2c26d88695d0f6299f893554256a74a578c7a5c621f09e02ab1648ddeb8d19ee0b4a4d9fa95d6df0
6
+ metadata.gz: 565c6b0391f52b397aa037c1d2d6408f912476c162af5f2832417b007745757cfa4387125b3625f3be61717cbc2805183ed0bbfc71e81843d5540531d9cd0694
7
+ data.tar.gz: eda8718a1494c8661e48f1e8a87dde451f44a098a7e030db89e606d3534b07f15cebb67150be3659006be61ce1d2dea9f0c870fe0c44a57f2309b334a5689202
@@ -19,9 +19,7 @@ includes.each do |inc, subinc|
19
19
  else
20
20
 
21
21
  if record.send(inc).nil?
22
- json.set! inc do
23
- json.null!
24
- end
22
+ json.set! inc, nil
25
23
  else
26
24
  partial = model_partial(record.send(inc))
27
25
  json.set! inc do
@@ -33,12 +31,10 @@ includes.each do |inc, subinc|
33
31
  else
34
32
 
35
33
  if record.send(inc).nil?
36
- json.set! inc do
37
- json.null!
38
- end
34
+ json.set! inc, nil
39
35
  elsif record.send(inc).is_a?(ActiveModel::Model)
40
- partial = model_partial(record.send(inc))
41
36
  json.set! inc do
37
+ partial = model_partial(record.send(inc))
42
38
  json.partial! partial, partial.split('/').last.to_sym => record.send(inc), includes: subinc
43
39
  end
44
40
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standardapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Bracy