Skip to content
Browse files

Merge pull request #15407 from ShunsukeAida/correct_model_name_example

fixed ActiveModel documentation [ci skip]
  • Loading branch information...
2 parents 4a3f71b + 33cc907 commit b67e2adaebe44a07643ee14b16a96e43693c68a2 @arthurnn arthurnn committed May 29, 2014
Showing with 2 additions and 2 deletions.
  1. +1 −1 activemodel/README.rdoc
  2. +1 −1 activemodel/lib/active_model/naming.rb
View
2 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]
View
2 activemodel/lib/active_model/naming.rb
@@ -204,7 +204,7 @@ def _singularize(string, replacement='_')
# 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

0 comments on commit b67e2ad

Please sign in to comment.
Something went wrong with that request. Please try again.