Skip to content
Browse files

Name#model_name doesn't return a String object

  • Loading branch information...
1 parent 4a3f71b commit 33cc907305db586c39eba3de8b2066debc4d0606 @shunsukeaida shunsukeaida committed May 30, 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 33cc907

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