Sha256: 6368808dd18fbbf62b7b36f39b9a0104226dfd73be27f313e206038de70d8228
Contents?: true
Size: 475 Bytes
Versions: 8
Compression:
Stored size: 475 Bytes
Contents
require 'csv' Varietal.delete_all VarietalAlias.delete_all if Varietal.count == 0 CSV.foreach('db/static/varietals.csv', :headers => true) do |row| Varietal.create!(row.to_hash) end CSV.foreach('db/static/varietal_aliases.csv', :headers => true) do |row| VarietalAlias.create!(row.to_hash) end end Bottle.delete_all # for now if Bottle.count == 0 CSV.foreach('db/static/bottles.csv', :headers => true) do |row| Bottle.create!(row.to_hash) end end
Version data entries
8 entries across 8 versions & 3 rubygems