graphiti 1.2.39 → 1.2.40

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
  SHA256:
3
- metadata.gz: 6d2917a607d95ef6d4701b8960ed183fd39923662b034d74fda9f8080f65d534
4
- data.tar.gz: 7fc8ec33363e0112c541d05c676c7315b1934876f15875ac0b153bf2fc6cebdd
3
+ metadata.gz: d10b110934848ed53d75bb0b8595f73c50524833818d39dc53f3859c393d342b
4
+ data.tar.gz: a28ab64e8453486628ee93d131914479c24d60ade77e8dd201030bbe68dd055c
5
5
  SHA512:
6
- metadata.gz: 6f9867cbf49483cb09a887db26af222e2d74962c07aaf6ece7552a73cf74b625ca49e19ed730c1f383f7706ae10546551d54792b2b09832709aa14829ddd8180
7
- data.tar.gz: 746d7900a12437a7a610dc8d4e8737ada319867578349898cc95067d7295c1b04b659dec00e33aec0a9977c33ecafd0a58f9f07da61ec04def6ad8131656351f
6
+ metadata.gz: 1d1d78896c8079cfbc4e74f3f6b754047a5c597adfe87023340adae7c56029ef60873c5cfe91fd099d7aac7965db7048dfb45e10efa8d29a39e4cdbfc19d99e3
7
+ data.tar.gz: f563f24c252c72e49a8bc8ba52ac8a6c5ab814d7699817fce981adee68dc74edc6e3dc82f2a5fdc5986e1b07411fbad776df5bba7099baeae930b305a03e0b92
@@ -137,11 +137,16 @@ module Graphiti
137
137
  end
138
138
 
139
139
  def link_extra_fields
140
+ return unless context&.respond_to?(:params)
141
+
140
142
  extra_fields_name = [association_name, resource.type].find { |param|
141
143
  context.params.dig(:extra_fields, param)
142
144
  }
143
145
 
144
- {resource.type => context.params.dig(:extra_fields, extra_fields_name)} if extra_fields_name
146
+ if extra_fields_name
147
+ extra_fields = context.params.dig(:extra_fields, extra_fields_name)
148
+ {resource.type => extra_fields}
149
+ end
145
150
  end
146
151
 
147
152
  # The parent resource is a remote,
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.2.39"
2
+ VERSION = "1.2.40"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.39
4
+ version: 1.2.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable