activerecord_cloneable 0.3.16 → 0.3.17

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: 66fb4191da19f4bb3867b2d96386443a62afb7d2
4
- data.tar.gz: 6e745acb6ce0a73db1d4a634c2408855bfedd43e
3
+ metadata.gz: 63e818d1b83b06f055dfb150080cd5a2bc6773a1
4
+ data.tar.gz: 3d22fc913a7b3e715c9d94695eda9d44148b7d20
5
5
  SHA512:
6
- metadata.gz: 6b6a7e4072ef7c19f79320001e371960c52761cefb249e48f7205289c9619578221e5909b78bed9b20dc5567ad24d2a93e1759d182a9b0ff4ef5c2106332ba42
7
- data.tar.gz: e24396af629302941fe9ba271ecab71530d8b29d3d37face8147a4a3b02b028100e613b8a0b8f3662c8223c9748dc1148c752a59aad0a413aefbe8615a5f30de
6
+ metadata.gz: e79aa778f08b7319d346b27b7fa9bb2094cabce77afaf9ca5afc88860955dfc7b1ba3182640b257355c94a2e50dcce35be453f1c1d7cafb1172d600598bb542c
7
+ data.tar.gz: ec9e33cf250bd3ca011cf6a3661e3880e9093ae5e189568da48f26d8cf670a4b2d294864bd48d01ec7c0f98d426cf1ecfb65a76b050afc66bac02e0532e354ea
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'activerecord_cloneable'
3
- s.version = '0.3.16'
3
+ s.version = '0.3.17'
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'
@@ -42,7 +42,6 @@ module ActiveRecord::Cloneable
42
42
  def clone_belongs_to_relations( relations, cloned_record, args )
43
43
  return if relations.nil?
44
44
  relations.each do |parent_relation|
45
- puts "Cloning (belongs_to) #{parent_relation.name} with #{args}"
46
45
  obj = send( parent_relation.name )
47
46
  next if obj.nil?
48
47
  next if args[:skipped_children].include?( obj )
@@ -129,7 +128,6 @@ module ActiveRecord::Cloneable
129
128
  # child_args[:attributes][child_relation.primary_key_name.to_sym] = nil
130
129
  #end
131
130
  begin
132
- puts "Cloning #{child_relation.name} with #{child_args}"
133
131
  cloned_child_record = child_record.clone_record( child_args )
134
132
  cloned_record.send( child_relation.name ) << cloned_child_record
135
133
  rescue NoMethodError
@@ -152,7 +150,6 @@ module ActiveRecord::Cloneable
152
150
  stack: args[:stack] + [ child_relation.name ] ,
153
151
  skipped_child_relations: args[:skipped_child_relations].find_all{ |x| x.is_a?( Hash ) && x[child_relation.name.to_sym] }.map{ |x| x.values }.flatten }
154
152
  begin
155
- puts "Cloning #{child_relation.name} with #{child_args}"
156
153
  cloned_child_record = kid.clone_record( child_args )
157
154
  cloned_record.send( "#{child_relation.name}=", cloned_child_record )
158
155
  rescue NoMethodError
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.16
4
+ version: 0.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Palmblad