Some headlines have extreme cases (pun intended) that you may need.
For example, small words at the beginning of a title or after punctuation often need to be capitalized (for example, “The Chronicles of Narnia: The Lion, the Witch and the Wardrobe,” which has both).
It may also be necessary / necessary to force small words into lower case, so that the input signal like "Jack and Jill" is transmitted to "Jack and Jill".
Sometimes you may also need to determine when a word (usually brand names) should retain unusual capitalization, for example. "iPod" or acronyms, for example. "NATO" or domain names, "example.com".
To properly handle such cases, the titleize gem is your friend or should at least serve as the basis for a complete solution.
inopinatus
source share