From 383e316ab21cb029230088500ceb09da6675c0b8 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Thu, 28 Nov 2024 09:28:58 +0000 Subject: [PATCH] Improve formatting helper --- app/helpers/formatting_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/helpers/formatting_helper.rb b/app/helpers/formatting_helper.rb index b30dc4b94..4f8313448 100644 --- a/app/helpers/formatting_helper.rb +++ b/app/helpers/formatting_helper.rb @@ -16,9 +16,7 @@ module FormattingHelper end def lowercase_first_letter(text) - first_word = text.split.first - return text if first_word == first_word.upcase - return text if text.blank? + return text if text.blank? || text.split.first == text.split.first.upcase text[0].downcase + text[1..] end