graphiti 1.0.beta.2 → 1.0.beta.3

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: 6ca2321a8344025294b75fc03fdb42ee20481aed
4
- data.tar.gz: 67f0452ff98f84d8e6af5c7226dd82c293a596f4
3
+ metadata.gz: daa31821b2ed08b5dcfa8ab650ea11a9a9e60371
4
+ data.tar.gz: 1ea3ccdc81754648db6814386089a25e0d10818f
5
5
  SHA512:
6
- metadata.gz: 61813ec5f5dfe12cf5c02f78db7ee3cdbef5e2ede47eb030ef0621b1f1bd0a17df890b4d5f8498e6be6653d67449e756945bc9eff747127b5fce1a3c26a69144
7
- data.tar.gz: 40085d3ec88d517a8c0ed4623acfd0336aa6e44e5bba2a0f619d510d8778a0caf0f1afec1e9349f4f5798f3621a4bca88f5f2c3bf0762a12548087432b89af22
6
+ metadata.gz: a6733f538d3256a7ca7888c14e499542b0a4c2c5e95c361a7e2ec7f93709b43fc56a92c0a0cfa7a3b809613e793b75dd635a107caebe5781dc78fa53d309e24c
7
+ data.tar.gz: b3020aaaed2ae56ca5065fe73dfbea1b7b18552f0bb36411858190520ccc71555033c88005b81c6cf092067688cd3100546ba06a4d0071b565a4529c51c7c18e
@@ -109,9 +109,14 @@ module Graphiti
109
109
  memo
110
110
  end
111
111
 
112
+ # If eager loading, ensure routes are loaded first, then apply
113
+ # This happens in Railtie
112
114
  def eagerly_apply_sideload?(sideload)
113
- autoloading = defined?(::Rails) && !::Rails.application.config.eager_load
114
- autoloading || sideload.resource_class_loaded?
115
+ if defined?(::Rails)
116
+ ::Rails.application.config.eager_load ? false : true
117
+ else
118
+ sideload.resource_class_loaded?
119
+ end
115
120
  end
116
121
  end
117
122
  end
@@ -78,6 +78,9 @@ module Graphiti
78
78
  end
79
79
 
80
80
  def save(action: :create)
81
+ # TODO: remove this. Only used for persisting many-to-many with AR
82
+ # (see activerecord adapter)
83
+ Graphiti.context[:namespace] = action
81
84
  validator = persist do
82
85
  @resource.persist_with_relationships \
83
86
  @payload.meta(action: action),
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.0.beta.2"
2
+ VERSION = "1.0.beta.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.beta.2
4
+ version: 1.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond