restful-jsonapi 0.0.12 → 0.0.13

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: 5dfb625e5f2a032b04b7d388ce31929f23c4e2c1
4
- data.tar.gz: f8b969133329ac3a8349a66b8eb41e7c698dc5d2
3
+ metadata.gz: 179fb343c19c986c98dcad509981ea7c0a2f1bd6
4
+ data.tar.gz: 715ef0615a9e8da7ce0286f42289e3bbb75fd2dd
5
5
  SHA512:
6
- metadata.gz: 2b67b168ce3e637d28ee2922c98aa2b655f5e4f75b684208203ddf0ae6a9a9b7da624158695812549831e8ad164e5d2a1203fbc934346bf2d31a9f6beb5fd91a
7
- data.tar.gz: 66e3062ae28fba36b833bc0b088ecfb8a236315f714666353677d7e33e14e9478a864f5a8102033cd7785d0f339ba62ced4f6ca17a00c5cfd5ac8143feaf762b
6
+ metadata.gz: 4971890deed77d6526e8e1a7a9bb462ded3654d98e90386d3595ad8b2efda27e844253bf7fdba86464391761c7cbd41706c76739bdc365d82d180e873b1aaa01
7
+ data.tar.gz: 07c810d67931608fbd97d99a96e4db7e7a83f0adaf3cc55df3bba64d5bef38e7fc772aee737c741af403feaed8b410961df854ed498afc8aad41c15dfe3a1c0f
@@ -41,7 +41,7 @@ module Restful
41
41
  end
42
42
 
43
43
  def restify_belongs_to(relationship_name, relationship_data)
44
- if relationship_data[:data].has_key? :attributes
44
+ if relationship_data[:data].values_at(:attributes,:relationships).compact.length > 0
45
45
  relationship_key = relationship_name.to_s.underscore+"_attributes"
46
46
  {relationship_key => restify_data(relationship_name,relationship_data[:data])}
47
47
  else
@@ -1,5 +1,5 @@
1
1
  module Restful
2
2
  module Jsonapi
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful-jsonapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Wentz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-07 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler