Skip to content

Instantly share code, notes, and snippets.

@faloi
Created October 5, 2017 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faloi/5badbe21f4e51c59d0b479af1861a1bf to your computer and use it in GitHub Desktop.
Save faloi/5badbe21f4e51c59d0b479af1861a1bf to your computer and use it in GitHub Desktop.
# Pegar en config/initializers/inflections.rb y resetear el servidor
ActiveSupport::Inflector.inflections do |inflect|
inflect.clear :all
inflect.plural /([^djlnrs])([A-Z]|_|$)/, '\1s\2'
inflect.plural /([djlnrs])([A-Z]|_|$)/, '\1es\2'
inflect.plural /(.*)z([A-Z]|_|$)$/i, '\1ces\2'
inflect.singular /([^djlnrs])s([A-Z]|_|$)/, '\1\2'
inflect.singular /([djlnrs])es([A-Z]|_|$)/, '\1\2'
inflect.singular /(.*)ces([A-Z]|_|$)$/i, '\1z\2'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment