How should I name my models when they need to be named after a word which ends with “s” (link Bus, for example)? I suppose rails will pluralize it putting another “s” to end of the word. But I’d like my table to be called “buses” instead of “buss”.
Share
Rails will handle this for you by using
String#pluralizewhen generating models:And the resulting migration:
You can try it yourself in
rails ctoo: