Difference between revisions of "Code"

From mx Help Wiki
Jump to: navigation, search
m (New page: == A whiteboard for Code snippets, notes, etc. that might otherwise be lost or might be useful down the road, etc. == == Console! == ruby script/console <environment> === Add a number...)
 
m (Add a number of empty lots)
Line 13: Line 13:
 
  r = 0
 
  r = 0
 
  while r < 800 do
 
  while r < 800 do
  l = Lot.new(:otu_id => 8222, :key_specimens => 999, :rarity => '', :source_quality => '', :notes => 'Auto-created for ETOH move.')
+
  l = Lot.new(:otu_id => 8222, :key_specimens => 999, :rarity => "", :source_quality => "", :notes => 'Auto-created for ETOH move.')
 
  l.save!
 
  l.save!
 
  r += 1
 
  r += 1
 
  end
 
  end

Revision as of 13:13, 14 March 2007

A whiteboard for Code snippets, notes, etc. that might otherwise be lost or might be useful down the road, etc.

Console!

ruby script/console <environment>

Add a number of empty lots

$person_id = 2
$proj_id = 51
@proj = Proj.find(51)
r = 0
while r < 800 do
l = Lot.new(:otu_id => 8222, :key_specimens => 999, :rarity => "", :source_quality => "", :notes => 'Auto-created for ETOH move.')
l.save!
r += 1
end
Personal tools