1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42905 from dgorelik/patch-1

s/octopus/cactus
This commit is contained in:
Rafael França 2021-07-29 14:26:10 -04:00 committed by GitHub
commit 12372c5482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,13 +16,13 @@ module ActiveSupport
# inflect.plural /^(ox)$/i, '\1\2en'
# inflect.singular /^(ox)en/i, '\1'
#
# inflect.irregular 'octopus', 'octopi'
# inflect.irregular 'cactus', 'cacti'
#
# inflect.uncountable 'equipment'
# end
#
# New rules are added at the top. So in the example above, the irregular
# rule for octopus will now be the first of the pluralization and
# rule for cactus will now be the first of the pluralization and
# singularization rules that is runs. This guarantees that your rules run
# before any of the rules that may already have been loaded.
class Inflections
@ -167,7 +167,7 @@ module ActiveSupport
# regular expressions. You simply pass the irregular in singular and
# plural form.
#
# irregular 'octopus', 'octopi'
# irregular 'cactus', 'cacti'
# irregular 'person', 'people'
def irregular(singular, plural)
@uncountables.delete(singular)