diff db/seeds.rb @ 182:5b074cadc4d1 feature_55

Institution order number explicit in seed data file and now correctly processed.
author luisf
date Thu, 03 Feb 2011 14:42:31 +0000
parents da7cba64948d
children
line wrap: on
line diff
--- a/db/seeds.rb	Wed Feb 02 18:17:02 2011 +0000
+++ b/db/seeds.rb	Thu Feb 03 14:42:31 2011 +0000
@@ -17,11 +17,11 @@
 
 truncate_table('institutions')
 
-idx = 1
-
 open("db/seed_data/institutions.txt") do |institutions|
   institutions.read.each_line do |institution|
-    Institution.create(:name => institution.chomp, :order => idx)
-    idx = idx + 1
+    inst=institution.split('|')
+    
+    
+    Institution.create(:name => inst[0].chomp, :order => inst[1].chomp)
   end
 end
\ No newline at end of file