From 4d61303eb58cf32f95052227c3158a392dd23373 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Wed, 1 Jan 2025 16:25:18 +0100 Subject: Updated database seed data. --- db/seeds.rb | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'db') diff --git a/db/seeds.rb b/db/seeds.rb index c70512c..f049f01 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -16,17 +16,34 @@ User.create!( ) puts "Seeded admin account" -[ "Tartiff Clofi", - "Tartiff Caraïbe-Ananas", - "L'Irrésistible", - "[quatre]", - "[cinq]", - "[six]", - "[sept]", - "[huit]", -].each_with_index do |name, id| - scoring_id = id + 1 - Tartiflette.create!(name: name, scoring_id: scoring_id) +[ { participant: "Claudine", + name: "Tartiff Clofi" + }, + { participant: "Achille", + name: "Tartiff Caraïbe-Ananas" + }, + { participant: "Michel", + name: "L'Irrésistible" + }, + { participant: "Nicolas", + name: "Avaloù-Douariflette" + }, + { participant: "", + name: "[cinq]" + }, + { participant: "", + name: "[six]" + }, + { participant: "", + name: "[sept]" + }, + { participant: "", + name: "[huit]" + } ].each.with_index(1) do |t, scoring_id| + Tartiflette.create!( + scoring_id: scoring_id, + name: t[:name] + ) end puts "Seeded tartiflettes" -- cgit v1.2.3