dumpable 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/dumpable.gemspec +1 -1
- data/lib/dumpable.rb +5 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/dumpable.gemspec
CHANGED
data/lib/dumpable.rb
CHANGED
@@ -45,7 +45,11 @@ module Dumpable
|
|
45
45
|
if reflection.macro == :belongs_to
|
46
46
|
object.send("#{reflection.association_foreign_key}=", object.id + id_padding)
|
47
47
|
elsif [:has_many, :has_one].include? reflection.macro
|
48
|
-
|
48
|
+
if reflection.respond_to?(:foreign_key)
|
49
|
+
child_object.send("#{reflection.foreign_key}=", object.id + id_padding)
|
50
|
+
else
|
51
|
+
child_object.send("#{reflection.primary_key_name}=", object.id + id_padding)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
puts child_object.send(:generate_insert_query, id_padding)
|
51
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumpable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
segments:
|
128
128
|
- 0
|
129
|
-
hash: -
|
129
|
+
hash: -2248843498865931733
|
130
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
131
|
none: false
|
132
132
|
requirements:
|