motion-json-api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/motion-json-api/resource.rb +1 -2
- data/lib/motion-json-api/version.rb +1 -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: 70ffd1c94a4279deeb66c42235e0439474526a58
|
4
|
+
data.tar.gz: b6733acb00176884009cf37fdcaa48e8ea1c4a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f4d8fdf83d71a5b857f21939af81d48e9a9b6787535fca44c49a95400b3c6e44abc559b1e344e64acdac5d8619e7efa94d7e6caaa7abcea54a61e5b4bd9bcb
|
7
|
+
data.tar.gz: d3107e79a51619746d7b4fb9969eadf56ba8079791552e4592bb1b90c70b08fe00f5b89eb42484344c8075ec7a2e6b202aa84d15483a15f7555b15fdd07ef2ea
|
@@ -48,9 +48,8 @@ module MotionJsonApi
|
|
48
48
|
key = options.fetch(:key, relation)
|
49
49
|
define_method(key) do
|
50
50
|
relationship = self.relationships.fetch(relation.to_s, {})
|
51
|
-
|
52
51
|
data = relationship.fetch("data", nil)
|
53
|
-
if data
|
52
|
+
if data && !data.empty?
|
54
53
|
object = _find_in_included(data["id"], data["type"])
|
55
54
|
if object
|
56
55
|
payload = {"data" => object, "links" => relationship.fetch("links", {})}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-json-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joffrey Jaffeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|