Rails String#upcase_first VS capitalize and titleize
What comes in your mind when you have a task to make the first letter of a string uppercase? You might think about using capitalize method, or titleize method.
In one of my recent projects, we’ve been asked to ensure first capital letter in first and last name of a user. Sounds simple right? We’ve used Rails 7.1 normalization API together with String#titleize.