db/seeds.rb in hackathon_manager-0.4.0 vs db/seeds.rb in hackathon_manager-0.4.1
- old
+ new
@@ -8,10 +8,11 @@
require 'csv'
puts "Seeding school list..."
-csv_text = File.read('db/schools.csv')
+csv_file = File.join(File.dirname(__FILE__), 'schools.csv')
+csv_text = File.read(csv_file)
csv = CSV.parse(csv_text, headers: true)
csv.each do |row|
School.create(row.to_hash)
end