mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
fix bikeloader
This commit is contained in:
Binary file not shown.
@@ -3,9 +3,8 @@ task :load_recyclery_bike_db => :environmnent do
|
||||
Bike.all.destroy
|
||||
file = "lib/assets/recyclery_bike_log.txt"
|
||||
puts "loading bike database from #{file}"
|
||||
File.foreach(file).do |line|
|
||||
File.foreach(file) do |line|
|
||||
data = line.split("|")
|
||||
Bike.create(date: data[1])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user