json_api_resource 3.1.1 → 3.1.2

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: 4405ad460cc5bf1eb3938463234e3e436a89ac0f
4
- data.tar.gz: 44fcf50c1dbfc5f758ae148281adec83ac42d9b4
3
+ metadata.gz: 13e9600501a6f2a21a70a2b13ff8cad8aab22d35
4
+ data.tar.gz: dd811f7b87e94f15fbbab5549d50a1bc85869ddb
5
5
  SHA512:
6
- metadata.gz: acf93bc85f19025b7a84c26f1859abe14983bd90e32755867ca7d0c3a17fdc78682f5287a140210da18932f612639844abed6f8945a29d5c4e1bcdd9953c8102
7
- data.tar.gz: 82667c8d55f1d33c9fc78c28458947b8eaabf18f1adffb788d76bee9f193814a42e124e1b54dc7cd4ba9d3b74efc017e7275ad3ad96105b42b251fa504961577
6
+ metadata.gz: 140c6a3fd98e22c8049986efc3f426117bf2883197ce01a90b42a6a9d66480e28f1b5c50983fa7f5f28b04dc815bf9d2be9af5b80f9a4fba7a842a51acce8578
7
+ data.tar.gz: a595e2e9e54e505cb045db24025a48f9be40c3c196c1b753d9c231e4770beb24dea9a7634883f009c3768057251c0f0b4bb35f2e26828b69d328a1c9dab14e9a
@@ -26,7 +26,7 @@ module JsonApiResource
26
26
  private
27
27
 
28
28
  def safe?( query )
29
- query[key].present?
29
+ raise NotImplementedError
30
30
  end
31
31
 
32
32
  def assign( objects, results )
@@ -8,6 +8,10 @@ module JsonApiResource
8
8
  { id: ids }.merge(opts)
9
9
  end
10
10
 
11
+ def safe?( query )
12
+ query[:id].present?
13
+ end
14
+
11
15
  def distributor_class
12
16
  JsonApiResource::Associations::Preloaders::Distributors::DistributorByTargetId
13
17
  end
@@ -8,6 +8,10 @@ module JsonApiResource
8
8
  { id: ids }.merge(opts)
9
9
  end
10
10
 
11
+ def safe?( query )
12
+ query[:id].present?
13
+ end
14
+
11
15
  def distributor_class
12
16
  JsonApiResource::Associations::Preloaders::Distributors::DistributorByTargetId
13
17
  end
@@ -8,6 +8,10 @@ module JsonApiResource
8
8
  { key => ids }.merge(opts)
9
9
  end
10
10
 
11
+ def safe?( query )
12
+ query[key].present?
13
+ end
14
+
11
15
  def distributor_class
12
16
  JsonApiResource::Associations::Preloaders::Distributors::DistributorByObjectId
13
17
  end
@@ -8,6 +8,10 @@ module JsonApiResource
8
8
  { key => ids }.merge(opts)
9
9
  end
10
10
 
11
+ def safe?( query )
12
+ query[key].present?
13
+ end
14
+
11
15
  def distributor_class
12
16
  JsonApiResource::Associations::Preloaders::Distributors::DistributorByObjectId
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module JsonApiResource
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_api_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Sislow