Name#model_name doesn't return a String object

This commit is contained in:
ShunsukeAida 2014-05-30 00:01:10 +09:00
parent 4a3f71b6fb
commit 33cc907305
2 changed files with 2 additions and 2 deletions

View File

@ -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]

View File

@ -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