Yedhin
← blog

Rails 6.1 raises an error for impossible camelcase inflections

How impossible camelcase inflections cause routing errors and how to fix them with custom inflection rules

This article was originally published on the BigBinary blog.

Rails 6.1 tightened up its inflector — if you have a word that can't be reliably camelcased (think acronyms or edge-case pluralizations), Rails will now raise an error instead of silently producing broken route helpers. The article digs into what triggers these errors and how to define custom inflection rules in config/initializers/inflections.rb to fix them cleanly. Good one to bookmark if you've ever hit a mysterious NameError after adding a new resource.


Read on BigBinary →