accepts_nested_ids 0.1.2 → 0.2.0
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/accepts_nested_ids.rb +2 -1
- data/lib/accepts_nested_ids/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f82c620ec955edbc3d2dd873fc898e2daf90281
|
|
4
|
+
data.tar.gz: 79322c3d6f555b29abad9a293c8ef22e0b31c755
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 672c6bf363173008940b03a2dc2e070705a39d218b19bcc61672d65f025cacac53960f2c33b67ff989220a8cdc30b02595f5db433e553c6c66648ba0c18c743f
|
|
7
|
+
data.tar.gz: 6c1310b58f8e7a06f683bb700b0d5e46ab384ee8729f08cbacd4b116aa9a5063867c231eb424097cf0c9dc555431e6c2ba90d940f82c54c5eba7b9014ca1d2ea
|
data/CHANGELOG.md
ADDED
data/lib/accepts_nested_ids.rb
CHANGED
|
@@ -24,7 +24,8 @@ module AcceptsNestedIds
|
|
|
24
24
|
# end
|
|
25
25
|
#
|
|
26
26
|
def save_nested_id_associations
|
|
27
|
-
self.class.base_class.nested_id_associations
|
|
27
|
+
aggregated_id_associations = self.class.nested_id_associations | self.class.base_class.nested_id_associations
|
|
28
|
+
aggregated_id_associations.each do |nested_id_association|
|
|
28
29
|
if instance_variable_get("@#{nested_id_association.ids_attr}")
|
|
29
30
|
association_class = nested_id_association.class_name.constantize
|
|
30
31
|
ids = send(nested_id_association.ids_attr)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: accepts_nested_ids
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuval Kordov
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -106,6 +106,7 @@ files:
|
|
|
106
106
|
- ".gitignore"
|
|
107
107
|
- ".rspec"
|
|
108
108
|
- ".travis.yml"
|
|
109
|
+
- CHANGELOG.md
|
|
109
110
|
- Gemfile
|
|
110
111
|
- LICENSE.txt
|
|
111
112
|
- README.md
|