diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 500be2a04a4..c6500f47e25 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -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] diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 11ebfe6cc01..2a428687c53 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -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