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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8990fae5a00349dbfb5f3fd9066c590126e637
|
4
|
+
data.tar.gz: cd5fa6ecb84d09a2bc72066dea8f3a133b02d0d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cccd447bcdb4d412e0bcf77fbb2c6ae84497fc7cd34e28993788dd2473ec55ed9b8fb72332186f6612f11e8d4bbd78631d57e22d14527b7e20f4d1b36de3c1b
|
7
|
+
data.tar.gz: 3800a7453d7046e4a733b54f901dce2e71f88b061309071148c38eb19a0b2acd0394d2435402f464615cfe9997d1a71238ddb628b1efeb7bd660394a5ce6f3cb
|
@@ -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
|