activerecord_cloneable 0.3.6 → 0.3.7
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 +1 -1
- 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: 7af70378af104d54af780101958ae3c0d86278b3
|
4
|
+
data.tar.gz: fba35e98593cdb3d237851c14fe814c66944d97c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43b54cb8ce189b4a94d333082504ab8afc353f424c54ec070b19f54814a341de9034486e05580984f6e27fd8cc4c576e276d2d0aa3a0b6beb4dfd3a873872709
|
7
|
+
data.tar.gz: 4eec3f4ade9d3bc70d9d6059b169d7b80e1247cb58cbb80e999cccc1e5f6ba9c5e5f611713c659e3d596052a0fde0c5c0c4c08525f827f6487c4e21b689d09e5
|
@@ -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.7'
|
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'
|
@@ -43,7 +43,6 @@ module ActiveRecord::Cloneable
|
|
43
43
|
return if relations.nil?
|
44
44
|
relations.each do |parent_relation|
|
45
45
|
obj = send( parent_relation.name )
|
46
|
-
puts "Cloning #{parent_relation.name} with #{args.inspect}"
|
47
46
|
next if obj.nil?
|
48
47
|
next if args[:skipped_children].include?( obj )
|
49
48
|
if args[:shared_parent_relations].include?( parent_relation.name.to_sym )
|
@@ -90,6 +89,7 @@ module ActiveRecord::Cloneable
|
|
90
89
|
end
|
91
90
|
# ---------------------------------------------------------------------- clone
|
92
91
|
def clone_record( args = {} )
|
92
|
+
puts "Cloning #{parent_relation.name} with #{args.inspect}"
|
93
93
|
args[:shared_parent_relations] ||= []
|
94
94
|
args[:skipped_child_relations] ||= []
|
95
95
|
args[:cloned_parents] ||= []
|