embark-journey 0.1.7 → 0.1.8

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: bc3442c576cca9a1d226240c75698f6bd3aedfbb
4
- data.tar.gz: a1deb2ac3523e3bb1b19b8c863fb134d44c7a514
3
+ metadata.gz: e2946db61324d75d323b00cc5b14ca7d75736a09
4
+ data.tar.gz: 2d427c591352c52dc1c0185dd0eb3075ad97656f
5
5
  SHA512:
6
- metadata.gz: 077244ca5e2e6b3e14d4474068678e968eb55304d7ddb5a13226a866f126cb53ed9293b080f79b28528fc84751d32cdca7295ef4937a4c9ca023367da9513149
7
- data.tar.gz: 87d6e48a1182b6f5f7d07ddd142deefc9c4f6e51dac81f6294224492df47babb1b3a4769f9ddb6d63f3b0ebdc1bf57e613f95d890557f4ee182cd48813d9a0bf
6
+ metadata.gz: 51338af54f23c9deb21efa8159aead56801e2dd7bbae69e54c0cee93141c88b54ec86c10b8f18ce62bc5b518845e0021b185b258e060632d21c1db57b1ea8b72
7
+ data.tar.gz: 832da922d93cb9ffa15b4c8f1062ef66f55715a7e87af86927957931e987538827327a4026e189c2bf64508cf36d8bba1995196093432957d5a72dc040ad7805
@@ -1,3 +1,6 @@
1
+ v0.1.8
2
+ - Fixes another bug with associations vanishing.
3
+
1
4
  v0.1.7
2
5
  - Actually fixed denormalization issues. Fixed a nasty bug where an associated resource 404 would cause an infinite loop of GET requests.
3
6
 
@@ -13,11 +13,12 @@ module Journey::Resource::AttributeLoading
13
13
 
14
14
  super(attributes, remove_root, persisted).tap do
15
15
 
16
- # set the cached value of any updated associations (e.g. parent_id)
16
+ # set the cached value of any updated associations (e.g. parent for parent_id)
17
17
  # to nil so that they can be re-fetched
18
18
  attributes.keys.map(&:to_s).select{ |key| key =~ /_id$/ }.each do |association_key|
19
19
  association = association_key.gsub /_id$/, ''
20
- instance_variable_set("@#{association}", nil)
20
+ ivar_name = "@#{association}"
21
+ remove_instance_variable(ivar_name) if instance_variable_defined?(ivar_name)
21
22
  end
22
23
 
23
24
  # allow enum_sets to be loaded by key (rather than index)
@@ -2,7 +2,7 @@ module Journey
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 7
5
+ TINY = 8
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embark-journey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Davey