plus2_seeder 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plus2_seeder/seeder/base.rb +11 -1
- data/lib/plus2_seeder/version.rb +1 -1
- metadata +1 -1
@@ -10,6 +10,16 @@ module Plus2Seeder
|
|
10
10
|
end
|
11
11
|
|
12
12
|
|
13
|
+
def self.creator_class
|
14
|
+
@creator_class
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def self.creator_class=(class_name)
|
19
|
+
@creator_class ||= class_name
|
20
|
+
end
|
21
|
+
|
22
|
+
|
13
23
|
def run(seeder_name)
|
14
24
|
Plus2Seeder::Conductor.run(seeder_name)
|
15
25
|
end
|
@@ -26,7 +36,7 @@ module Plus2Seeder
|
|
26
36
|
|
27
37
|
# Determines the model class to use based on the name of the seeder
|
28
38
|
def creator_class
|
29
|
-
@creator_class ||= self.class.name.gsub('Seeder', '').constantize
|
39
|
+
@creator_class ||= (self.class.creator_class || self.class.name.gsub('Seeder', '')).constantize
|
30
40
|
end
|
31
41
|
|
32
42
|
|
data/lib/plus2_seeder/version.rb
CHANGED