titleize icon indicating copy to clipboard operation
titleize copied to clipboard

Adds ability to specify custom small words and acronyms

Open santry opened this issue 8 years ago • 2 comments

This PR adds the ability to pass a list of acronyms to be capitalized when titleizing a string. It also includes the ability to pass a custom list of small words, which are added to the built-in list.

When ActiveSupport is loaded, titleize now will also respect the acronyms configured in ActiveSupport::Inflector.inflections.acronyms.

santry avatar Apr 13 '17 15:04 santry

Thanks! This looks good, and I think I'll merge it with some minor changes.

I'll get Hound to stand down on some of its issues – single quotes for sure.

It also takes care of the languishing #11.

granth avatar Apr 25 '17 16:04 granth

Sounds good. I left hound's howls alone since what I added seemed to (mostly) match what I saw in the existing code. If you need me to make changes I'm happy to, or, of course, you can hack it as you wish!

santry avatar Apr 25 '17 17:04 santry