diff options
author | ShunsukeAida <s.aida@scsk.jp> | 2014-05-30 00:01:10 +0900 |
---|---|---|
committer | ShunsukeAida <s.aida@scsk.jp> | 2014-05-30 00:09:41 +0900 |
commit | 33cc907305db586c39eba3de8b2066debc4d0606 (patch) | |
tree | c6e63f4219a619314c23ddf624b97e00346e08b9 /activemodel | |
parent | 4a3f71b6fb07f5bbf9e43b259a7429c96752e00b (diff) | |
download | rails-33cc907305db586c39eba3de8b2066debc4d0606.tar.gz rails-33cc907305db586c39eba3de8b2066debc4d0606.tar.bz2 rails-33cc907305db586c39eba3de8b2066debc4d0606.zip |
Name#model_name doesn't return a String object
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/README.rdoc | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 500be2a04a..c6500f47e2 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 11ebfe6cc0..2a428687c5 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 |