ruby-on-railsinflector

Rails Inflector classifies incorrectly


Trying to classify the following cuts off the last letter.

"ToSMS".classify
=> "ToSM"

Any ideas why this is happening?


Solution

  • Figured out why it was doing that. It treated SMS as a plural of SM. Added the following to the inflectors:

    inflect.irregular 'SMS', 'SMS'