reactive-record 0.7.10 → 0.7.11

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: f87f4c7dd6020944c3ae979759a058f28c5fc5b2
4
- data.tar.gz: f169ab4179b0ef77f3ba0c38257bf09d69e3fd07
3
+ metadata.gz: 06aea49de3ad2b4cecc3fd5361411b9caaa9f8c1
4
+ data.tar.gz: ac539741bf1817ffccdac4fb2a05be56a9a73575
5
5
  SHA512:
6
- metadata.gz: 872a3fb5c181c87913f4db432e093a84126e69959b408b3c68e4a5585680eb0aa4cf8965286968b92619ac83f4ea1b94cadbf149b6a6abf2079e2f97309182bf
7
- data.tar.gz: 4117a18f6141462ccf5af5bc8e8dde69df493577fbd46c10e03e8c7f9ed710eeb8ecf477653199989ebf3d5dcd587aa2af1471d34605a056024bbfcb12b6775a
6
+ metadata.gz: 9bc27fd3212e4384b081582bcd7a020fa8de5e33e45cdf02222d46a978ca5e8adf60d2c42b123cef47505d1a923662809a5e9fe70c547b8cb776be2323abf4cf
7
+ data.tar.gz: ca69357ef64c353040b7fd18498e25369a3e940edd128d120896a9474a30b00148ae05463de692021e5f0cf88bd0063804d0a0da653d1bf2bb972c50beaaee5e
@@ -225,8 +225,10 @@ module ReactiveRecord
225
225
  if association = record.model.reflect_on_association(attribute)
226
226
  if association.collection?
227
227
  value.each { |assoc| add_new_association.call record, attribute, assoc.instance_variable_get(:@backing_record) }
228
- else
228
+ elsif value
229
229
  add_new_association.call record, attribute, value.instance_variable_get(:@backing_record)
230
+ else
231
+ output_attributes[attribute] = nil
230
232
  end
231
233
  elsif record.model.reflect_on_aggregation(attribute)
232
234
  add_new_association.call record, attribute, value.instance_variable_get(:@backing_record)
@@ -1,3 +1,3 @@
1
1
  module ReactiveRecord
2
- VERSION = "0.7.10"
2
+ VERSION = "0.7.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactive-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitch VanDuyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails