jeremyevans-fixture_dependencies 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fixture_dependencies.rb +5 -0
- metadata +2 -2
data/lib/fixture_dependencies.rb
CHANGED
@@ -149,8 +149,13 @@ class << FixtureDependencies
|
|
149
149
|
puts "#{spaces}#{record}.#{attr} = #{value.inspect}" if verbose > 2
|
150
150
|
obj.send("#{attr}=", value)
|
151
151
|
end
|
152
|
+
|
152
153
|
puts "#{spaces}saving #{record}" if verbose > 1
|
154
|
+
|
153
155
|
model_method(:model_save, mtype, obj)
|
156
|
+
# after saving the model, we set the primary key within the fixture hash, in case it was not explicitly specified in the fixture and was generated by an auto_increment / serial field
|
157
|
+
fixtures[model_name.to_sym][name.to_sym][model.primary_key.to_sym] ||= obj[model.primary_key.to_sym]
|
158
|
+
|
154
159
|
loading.pop
|
155
160
|
# Update the circular references
|
156
161
|
if procs[record]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeremyevans-fixture_dependencies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-27 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|