From cf8cc196a32a191ad766dd561c8469190b9251f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Mon, 9 Sep 2024 12:02:15 +0200 Subject: [PATCH] =?UTF-8?q?Finally=20fixed=20seed=20(bad=20=C3=B6=C3=A4?= =?UTF-8?q?=C3=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/seeds.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 17df35f..684ce7b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -21,9 +21,9 @@ User.create!(email: "tutor2.operator@hs-rm.de", firstname: "Tutor2", lastname: " # Students students = [] 5.times do - firstname = Faker::Name.unique.first_name.delete(" ") - lastname = Faker::Name.unique.last_name.delete(" ") - email="#{firstname}.#{lastname}@student.hs-rm.de" + firstname = Faker::Name.unique.first_name + lastname = Faker::Name.unique.last_name + email="#{firstname}.#{lastname}@student.hs-rm.de".downcase.gsub('ö', 'oe').gsub('ä', 'ae').gsub('ü', 'ue') email.delete(" ") students << User.new(email: email, firstname: firstname, lastname: lastname, password_digest: BCrypt::Password.create("password"), verified: true) students.last.save!