activerecord_cloneable 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c81b1fbf2c02217309e3efbf4c4d8d6f9e7997a
4
- data.tar.gz: 066b580b8d8818ddbb6b8294e7dc8c5113286795
3
+ metadata.gz: eadbb5b8c08b54cfb2a056597983026f2ae210ce
4
+ data.tar.gz: a7ce25f2bf377aa66bd69767e55c25e22717757e
5
5
  SHA512:
6
- metadata.gz: 2aeddf99d7f62ebd5a3407834574d0a1bfc7143477ef6262a622fbb1dd5acf0b6e7221e541b992dd03ab47fdf9b17891092a1ac1304d5fa0976a3c845baab3c1
7
- data.tar.gz: 34b9a54f131a30226161d79cb7d5be772b91503d6a9c92f2e4f32945b3ccd004bd41de2e482b5f649fa48cfba70bda01cb7fb8bb2c0742062d68fa563b0c5f47
6
+ metadata.gz: 7a56d300a32906953b79a350135a64fc5edd7340cc72106c63a81924881a666adfb910be27648ba65c4a42dd5b95ec5772f2144b5f4ccd0c9db9ba41df90e0dc
7
+ data.tar.gz: 546b3b0a26a76dedbf82a44a90b8f534b79be9000e65d97bbe1fae17f9b85bd9cd1585c09e692e6eee2ee20139b2cc530b01d9379fac13c2924cc440016c34e1
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'activerecord_cloneable'
3
- s.version = '0.3.2'
3
+ s.version = '0.3.3'
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'
@@ -112,8 +112,12 @@ module ActiveRecord::Cloneable
112
112
  kids.each do |child_record|
113
113
  next if args[:skipped_children].include?( child_record )
114
114
  cloned_child_record = kids.build
115
- child_args = { cloned_parents: args[:cloned_parents] + [self], attributes: {}, object: cloned_child_record,
116
- skipped_child_relations: find_applicable_clone_args( child_relation.name, args[:skipped_child_relations] ) }
115
+ child_args = { cloned_parents: args[:cloned_parents] + [self],
116
+ attributes: {},
117
+ object: cloned_child_record,
118
+ skipped_parent_relations: find_applicable_clone_args( child_relation.name, args[:skipped_parent_relations] ),
119
+ shared_parent_relations: find_applicable_clone_args( child_relation.name, args[:shared_parent_relations] ),
120
+ skipped_child_relations: find_applicable_clone_args( child_relation.name, args[:skipped_child_relations] ) }
117
121
  #if child_relation.macro == :has_many ||child_relation.macro == :has_one
118
122
  # child_args[:attributes][child_relation.primary_key_name.to_sym] = nil
119
123
  #end
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.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Palmblad