mini_serializer 0.1.4 → 0.1.5
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/lib/mini_serializer.rb +3 -0
- data/lib/mini_serializer/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: e9f0c9e9a6f581e208d02b39cb6f6193586941c12a92ba9d577f25935ebb4ef6
|
|
4
|
+
data.tar.gz: c6e4d205a6b993a4d84581472da54c9c2a14df001cf5a7bd8b2d13d68afe0705
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e27f5de0f1d2092b7fe1fb798e1937474791d9eacd4bf865b2708ad354f81d0d85674cb1cf264038775922a99d6373638ef69b41622f04dba152a8ca2c1cd611
|
|
7
|
+
data.tar.gz: bfc7e5e688c58668b646e73e01829913f0cd9b7fb8e550d5818c21c86bb8602c0e4c05e2e4fe966333ddcd113e4e48555d5c446b185657b6dc6dca5697781ee8
|
data/lib/mini_serializer.rb
CHANGED
|
@@ -79,6 +79,9 @@ module MiniSerializer
|
|
|
79
79
|
if wams_has_one.any?
|
|
80
80
|
data_with_includes.merge! wams_main_object.includes(wams_association_object)
|
|
81
81
|
end
|
|
82
|
+
if wams_has_one.empty? && wams_has_one.empty? # when main object not any has_one and has_many
|
|
83
|
+
return wams_main_object # return main object
|
|
84
|
+
end
|
|
82
85
|
return data_with_includes
|
|
83
86
|
end
|
|
84
87
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mini_serializer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mahdi alizadeh
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-10-
|
|
11
|
+
date: 2018-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|