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

Merge pull request #42827 from jdufresne/author-id

Correct Inflector.humanize keep_id_suffix argument docs
This commit is contained in:
Eugene Kenny 2021-07-21 08:56:35 +01:00 committed by GitHub
commit 8dab534ca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -260,7 +260,7 @@ class String
# 'author_id'.humanize # => "Author"
# 'author_id'.humanize(capitalize: false) # => "author"
# '_id'.humanize # => "Id"
# 'author_id'.humanize(keep_id_suffix: true) # => "Author Id"
# 'author_id'.humanize(keep_id_suffix: true) # => "Author id"
#
# See ActiveSupport::Inflector.humanize.
def humanize(capitalize: true, keep_id_suffix: false)

View file

@ -123,7 +123,7 @@ module ActiveSupport
# humanize('author_id') # => "Author"
# humanize('author_id', capitalize: false) # => "author"
# humanize('_id') # => "Id"
# humanize('author_id', keep_id_suffix: true) # => "Author Id"
# humanize('author_id', keep_id_suffix: true) # => "Author id"
#
# If "SSL" was defined to be an acronym:
#