From 18bc2ec7cd7ee4f0e4deb8b198ff0cb57a4c2908 Mon Sep 17 00:00:00 2001 From: Sebastian Jambor Date: Fri, 13 Jan 2023 17:07:21 +0100 Subject: [PATCH] increase number of syllables for last name --- app/controllers/auth/registrations_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index a53f10d81..7c3837821 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -181,6 +181,11 @@ class Auth::RegistrationsController < Devise::RegistrationsController @@last_name_generator = RandomNameGenerator.new(RandomNameGenerator::FANTASY) def generate_name - "#{@@first_name_generator.compose(3)} #{@@last_name_generator.compose(2)}" + # When there is a name collision, the user will be shown + # "Something isn't quite right yet! Please review 2 errors below" + # When they sign up again, it will most probably succeed (since there is no collision anymore) + # While this isn't the best UX, it's only a minor issue + # (collisions happen after > 1k of users and there's an easy fix) # so not worth fixing for now + "#{@@first_name_generator.compose(3)} #{@@last_name_generator.compose(3)}" end end