jsonapi_compliable 0.5.4 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 300aebe5d7b76910ab0d29fe3988f75bfc2cfef7
4
- data.tar.gz: 28690fd4a57afdbc801e3e5c1c885700a1e9985c
3
+ metadata.gz: 1ac1ea02274ee52a60910c86b28d7acde7849763
4
+ data.tar.gz: c9355a34cc97a996f5f4ebb3c1006ce01eb092db
5
5
  SHA512:
6
- metadata.gz: a0cc71c6451e2dfc01eb9422f3acfb78afc0fc57fee74b81604ab48b089671dab2952fbc103edeaf520eb1b1cfb6308c1225d40378b0a83c70fe565dcc7d56e0
7
- data.tar.gz: ca7cdab114aeb8b24c2b58a4f3074caed3bbc7bfbc09fed0b10b5a9f4d11091a4eba4d4cbe9ab316d87be23ea5bc2be57b37e9f66d66a6318512e6b54e932f43
6
+ metadata.gz: 13eee8dc46e114513fcfabff4004ad16a96cad84e093f2c085ef6d1c71b63fc2615f124f76ba25825f454985ae6da2c17b25e101491ebec9deff7b42de16e930
7
+ data.tar.gz: 6eeadb16744a3564c68f78a420bf9f3267e2cc308e470e29763de1b4936ead081c34dfbac45743f7b2022efed20b0267519d331a68ebc4e4dd4f344ba9b3d09f
@@ -1,7 +1,7 @@
1
1
  module JsonapiCompliable
2
2
  module Adapters
3
3
  module ActiveRecordSideloading
4
- def has_many(association_name, scope:, resource:, foreign_key:, primary_key: :id, &blk)
4
+ def has_many(association_name, scope: nil, resource:, foreign_key:, primary_key: :id, &blk)
5
5
  _scope = scope
6
6
 
7
7
  allow_sideload association_name, resource: resource do
@@ -24,7 +24,7 @@ module JsonapiCompliable
24
24
  end
25
25
  end
26
26
 
27
- def belongs_to(association_name, scope:, resource:, foreign_key:, primary_key: :id, &blk)
27
+ def belongs_to(association_name, scope: nil, resource:, foreign_key:, primary_key: :id, &blk)
28
28
  _scope = scope
29
29
 
30
30
  allow_sideload association_name, resource: resource do
@@ -44,7 +44,7 @@ module JsonapiCompliable
44
44
  instance_eval(&blk) if blk
45
45
  end
46
46
 
47
- def has_one(association_name, scope:, resource:, foreign_key:, primary_key: :id, &blk)
47
+ def has_one(association_name, scope: nil, resource:, foreign_key:, primary_key: :id, &blk)
48
48
  _scope = scope
49
49
 
50
50
  allow_sideload association_name, resource: resource do
@@ -66,7 +66,7 @@ module JsonapiCompliable
66
66
  end
67
67
  end
68
68
 
69
- def has_and_belongs_to_many(association_name, scope:, resource:, foreign_key:, primary_key: :id, as: nil, &blk)
69
+ def has_and_belongs_to_many(association_name, scope: nil, resource:, foreign_key:, primary_key: :id, as: nil, &blk)
70
70
  through = foreign_key.keys.first
71
71
  fk = foreign_key.values.first
72
72
  _scope = scope
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-02-24 00:00:00.000000000 Z
12
+ date: 2017-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jsonapi-serializable