active_record-json_associations 0.6.6 → 0.6.7

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: be9f54a9dea98a2fefa8a354fd1e80420ae77902
4
- data.tar.gz: ac5aca1680ada8e5ccbc98034920c6f734205bc8
3
+ metadata.gz: db8990fae5a00349dbfb5f3fd9066c590126e637
4
+ data.tar.gz: cd5fa6ecb84d09a2bc72066dea8f3a133b02d0d3
5
5
  SHA512:
6
- metadata.gz: cc3c75d60285319e34cdd10aaf58a9820fabde5aa96885483e2409cfdf31c01aa6eadbf9605382929e1a1a2c883bd22ae223faf26c6236d189e6d8ccb5faa2fa
7
- data.tar.gz: e5e5e5b34a13778dc8d8e4905215905321fd288769ddde3d0d751c226841db93d24a601fb35c0b206499ea1e2e539d843f0e4927b55267c6624309dd1e4e21d7
6
+ metadata.gz: 8cccd447bcdb4d412e0bcf77fbb2c6ae84497fc7cd34e28993788dd2473ec55ed9b8fb72332186f6612f11e8d4bbd78631d57e22d14527b7e20f4d1b36de3c1b
7
+ data.tar.gz: 3800a7453d7046e4a733b54f901dce2e71f88b061309071148c38eb19a0b2acd0394d2435402f464615cfe9997d1a71238ddb628b1efeb7bd660394a5ce6f3cb
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module JsonAssociations
3
- VERSION = "0.6.6"
3
+ VERSION = "0.6.7"
4
4
  end
5
5
  end
@@ -81,6 +81,7 @@ module ActiveRecord
81
81
  define_method many_equals do |collection|
82
82
  collection.each do |record|
83
83
  new_id_array = Array(record.send(foreign_key)) | [id]
84
+ raise "FIXME: Cannot assign during creation, because no id has yet been reified." if new_id_array.any?(&:nil?)
84
85
  record.update foreign_key => new_id_array
85
86
  end
86
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-json_associations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel