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

Version Path
happy_place-0.0.7 spec/dummy/db/seeds.rb
happy_place-0.0.6 spec/dummy/db/seeds.rb
happy_place-0.0.5 spec/dummy/db/seeds.rb
happy_place-0.0.4 spec/dummy/db/seeds.rb
pliable-0.2.1 spec/dummy/db/seeds.rb
search_steroids-0.0.1 spec/dummy/db/seeds.rb
pliable-0.2.0 spec/dummy/db/seeds.rb
pliable-0.1.0 spec/dummy/db/seeds.rb