Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Name#model_name doesn't return a String object

  • Loading branch information...
commit 33cc907305db586c39eba3de8b2066debc4d0606 1 parent 4a3f71b
@shunsukeaida shunsukeaida authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.