How do I override rails naming conventions? -
I have a model called "clothes", which I want to be alone (a piece of cloth). By default, the rail says that plural clothing is. Ok or wrong, I think it would be more readable if the plural "cloth" is
How can I override the plural naming convention? Can I correct it in the model, so I have to do it more? How will it change how the routes are controlled (I am comfortable using architecture)?
I'm not a ROR specialist, but one got referenced from the site you got from config / initializers / Inflections.rb
can add the Infusion Rule to the file:
# Add new filters rule by using the following form ActiveSupport :: Inflector. Perform the interfaces. Infal | Inflect.irregular 'cloth', 'cloth' end
Comments
Post a Comment