csv_pirate 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/VERSION.yml +1 -1
- data/csv_pirate.gemspec +1 -1
- data/lib/csv_pirate.rb +5 -5
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
Version 4.0.4 2010-01-18
|
2
|
+
- Fixed bug with find_or_create param to to_memory
|
3
|
+
|
4
|
+
Version 4.0.3 2010-01-18
|
5
|
+
- Fixed typos in new to_memory method
|
6
|
+
|
1
7
|
Version 4.0.2 2010-01-18
|
2
8
|
- Improving to_memory method on CsvPirate
|
3
9
|
- Improving raise_anchor method on PirateShip
|
data/VERSION.yml
CHANGED
data/csv_pirate.gemspec
CHANGED
data/lib/csv_pirate.rb
CHANGED
@@ -351,10 +351,10 @@ class CsvPirate
|
|
351
351
|
end
|
352
352
|
buccaneers << obj
|
353
353
|
elsif permanence[:find_or_create]
|
354
|
-
obj = self.grub.send("find_by_#{permanence[:find_or_create].join('_and_')}".to_sym)
|
355
|
-
buccaneers << obj
|
354
|
+
obj = self.grub.send("find_by_#{permanence[:find_or_create].join('_and_')}".to_sym) || self.grub.create(data_hash)
|
355
|
+
buccaneers << obj
|
356
356
|
elsif permanence[:update_or_new]
|
357
|
-
obj = self.grub.send("find_by_#{permanence[:
|
357
|
+
obj = self.grub.send("find_by_#{permanence[:update_or_new].join('_and_')}".to_sym)
|
358
358
|
if obj.nil?
|
359
359
|
obj = self.grub.new(data_hash)
|
360
360
|
else
|
@@ -365,7 +365,7 @@ class CsvPirate
|
|
365
365
|
end
|
366
366
|
buccaneers << obj
|
367
367
|
elsif permanence[:update_or_save]
|
368
|
-
obj = self.grub.send("find_by_#{permanence[:
|
368
|
+
obj = self.grub.send("find_by_#{permanence[:update_or_save].join('_and_')}".to_sym)
|
369
369
|
if obj.nil?
|
370
370
|
obj = self.grub.new(data_hash)
|
371
371
|
obj.save(false)
|
@@ -377,7 +377,7 @@ class CsvPirate
|
|
377
377
|
end
|
378
378
|
buccaneers << obj
|
379
379
|
elsif permanence[:update_or_create]
|
380
|
-
obj = self.grub.send("find_by_#{permanence[:
|
380
|
+
obj = self.grub.send("find_by_#{permanence[:update_or_create].join('_and_')}".to_sym)
|
381
381
|
if obj.nil?
|
382
382
|
obj = self.grub.create(data_hash)
|
383
383
|
else
|