mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Name#model_name doesn't return a String object
This commit is contained in:
parent
4a3f71b6fb
commit
33cc907305
2 changed files with 2 additions and 2 deletions
|
@ -147,7 +147,7 @@ behavior out of the box:
|
|||
extend ActiveModel::Naming
|
||||
end
|
||||
|
||||
NamedPerson.model_name # => "NamedPerson"
|
||||
NamedPerson.model_name.name # => "NamedPerson"
|
||||
NamedPerson.model_name.human # => "Named person"
|
||||
|
||||
{Learn more}[link:classes/ActiveModel/Naming.html]
|
||||
|
|
|
@ -204,7 +204,7 @@ module ActiveModel
|
|||
# extend ActiveModel::Naming
|
||||
# end
|
||||
#
|
||||
# BookCover.model_name # => "BookCover"
|
||||
# BookCover.model_name.name # => "BookCover"
|
||||
# BookCover.model_name.human # => "Book cover"
|
||||
#
|
||||
# BookCover.model_name.i18n_key # => :book_cover
|
||||
|
|
Loading…
Reference in a new issue