activerecord_cloneable 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/activerecord_cloneable.gemspec +1 -1
- data/lib/active_record/cloneable.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1eb104db629e55177011dba45935651258f3c55
|
4
|
+
data.tar.gz: 52416a66d11244db49389e9dda401b96cd22ed95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e319eda36881ef90cad03ddb15fbfc279c6f3129c36ac9706dc5acdea5af4b9b57f2b905fd2d39676feab609a3811d7c2b001319ad42f99a39ba74dfe930a26e
|
7
|
+
data.tar.gz: a885179f43d5f03dcaf3f3de1bc0c808657106d69aa56b1d94b93142e86e56bd9b30fbdf2e7969ed4d3149a30d5efbc62227850bf963c39eb1f04fd95bb083a2
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'activerecord_cloneable'
|
3
|
-
s.version = '0.3.
|
3
|
+
s.version = '0.3.10'
|
4
4
|
s.summary = "A library to help clone active records - that is, generate active new record objects with the data copied from an existing record."
|
5
5
|
s.authors = ["Adam Palmblad"]
|
6
6
|
s.email = 'apalmblad@gmail.com'
|
@@ -51,7 +51,7 @@ module ActiveRecord::Cloneable
|
|
51
51
|
elsif !args[:cloned_parents].include?( obj )
|
52
52
|
# We don't know what the parent calls this child.
|
53
53
|
begin
|
54
|
-
rec = obj.clone_record( skipped_children: args[:skipped_children] + [self],
|
54
|
+
rec = obj.clone_record( skipped_children: args[:skipped_children] + [self, obj],
|
55
55
|
cloned_parents: args[:cloned_parents] + [self],
|
56
56
|
stack: args[:stack] + [ parent_relation.name ],
|
57
57
|
skipped_child_relations: find_applicable_clone_args( parent_relation.name, args[:skipped_child_relations] ),
|
@@ -119,7 +119,7 @@ module ActiveRecord::Cloneable
|
|
119
119
|
attributes: {},
|
120
120
|
stack: args[:stack] + [ child_relation.name ],
|
121
121
|
object: cloned_child_record,
|
122
|
-
skipped_children: args[:skipped_children],
|
122
|
+
skipped_children: args[:skipped_children] + [self, child_record],
|
123
123
|
skipped_parent_relations: find_applicable_clone_args( child_relation.name, args[:skipped_parent_relations] ),
|
124
124
|
shared_parent_relations: find_applicable_clone_args( child_relation.name, args[:shared_parent_relations] ),
|
125
125
|
skipped_child_relations: find_applicable_clone_args( child_relation.name, args[:skipped_child_relations] ) }
|