I have a model named "clothing" which I want to be the singlular (one piece of clothing). By default, rails says the plural is clothings. Right or wrong, I think it will be more readable if the plural is "clothes".
How do I override the plural naming convention? Can I do it right in the model so I don't have to do it over and over? How will this change how routes are handled (I am using restful architecture)?
I'm no RoR expert, but did find a possible approach. From the referenced site you can add inflection rule inside the
config/initializers/inflections.rb
file:With Ruby 2.2.2 windows or linux for me best solve was :
Add this in your
environment.rb
file if you are trying to stop database pluralizationFor rails 2.3.2 and maybe 2+, you need to do it a little different: