Rails uses ActiveSupport's inflector to derive table names, route helpers, and associations from model names. For uncountable English words like 'staff', 'metadata', and 'feedback', Rails incorrectly generates plurals like 'staffs' or 'metadatas'. The fix is to declare these words in config/initializers/inflections.rb using inflect.uncountable, which corrects pluralization everywhere at once. The post also notes when not to use this — for domain-specific jargon, irregular plurals (inflect.irregular), or acronym casing (inflect.acronym).

2m read timeFrom andycroll.com
Post cover image
Table of contents
Instead of…Use…Why?Why not?

Sort: