Rails scaffolding pluralisation is incorrect for “cafe”
问题 I want to create a cafe and a cave controller. When I try to create my cafe using rails scaffolding, via the command rails g scaffold cafe name:string It is deriving the plural form of "cafe" as "caves", which means I can't make my caves controller since the name is already used. How can I make rails use the correct pluralisation? 回答1: You can create your own inflections. Add this to your config/initializers/inflections.rb ActiveSupport::Inflector.inflections do |inflect| inflect.plural "cafe