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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43e4ea83b293768d8ed0c3c5ac45dd5770573360
4
- data.tar.gz: dcc26cd61cf78f0f826d61687ea65081b9de40ce
3
+ metadata.gz: c1eb104db629e55177011dba45935651258f3c55
4
+ data.tar.gz: 52416a66d11244db49389e9dda401b96cd22ed95
5
5
  SHA512:
6
- metadata.gz: 83ce99176bb14ffabcebf75206df3de861deab10ef8f0074f2874cd8ec56a25c0c34fd8f9e111cd0181521088a4b9cb4c0faa0ec3d1aa162c17ec714f9a97627
7
- data.tar.gz: 3e682815a835584ec41edb72c6a6f47dc222bb9b47a6f93be264cfe1f255a077de248b3721d73bbba88faa0428026cfce5c982b1a9492af3ba911da4467904f0
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.9'
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] ) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_cloneable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Palmblad