Now you can define your own inflections.
look in config / initializers / inflections.rb
example based on your question
ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'patata', 'patatas' end
In this way,
"patata".pluralize # => "patatas" "patatas".singularize #=> "patata"
Of course, you need to know the keyword list in advance in order to use the irregular method in config / inflections.rb. Take a look at the examples in this example in this file. There are other methods that allow you to define rules using regular expressions, and you can create match patterns to influence inflections for arbitrary keywords that match known patterns.
source share