This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pre-fastercsv examples to import CSV data in Ruby 1.8.7 | |
require 'csv' | |
CSV::Reader.parse(File.open('./db/sample_tasks.dat'), fs = 9) do |row| | |
next if row[0] == 'name' | |
Task.create!( | |
:name => row[0], | |
:description => row[1], | |
:duration => row[2], | |
:due_date => row[3], |
NewerOlder