Skip to content

Commit

Permalink
Name#model_name doesn't return a String object
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aida committed May 29, 2014
1 parent 4a3f71b commit 33cc907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion activemodel/README.rdoc
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion activemodel/lib/active_model/naming.rb
Expand Up @@ -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
Expand Down

0 comments on commit 33cc907

Please sign in to comment.