diff options
author | Arthur Nogueira Neves <arthurnn@gmail.com> | 2014-05-29 11:28:34 -0400 |
---|---|---|
committer | Arthur Nogueira Neves <arthurnn@gmail.com> | 2014-05-29 11:28:34 -0400 |
commit | b67e2adaebe44a07643ee14b16a96e43693c68a2 (patch) | |
tree | c6e63f4219a619314c23ddf624b97e00346e08b9 /activemodel | |
parent | 4a3f71b6fb07f5bbf9e43b259a7429c96752e00b (diff) | |
parent | 33cc907305db586c39eba3de8b2066debc4d0606 (diff) | |
download | rails-b67e2adaebe44a07643ee14b16a96e43693c68a2.tar.gz rails-b67e2adaebe44a07643ee14b16a96e43693c68a2.tar.bz2 rails-b67e2adaebe44a07643ee14b16a96e43693c68a2.zip |
Merge pull request #15407 from ShunsukeAida/correct_model_name_example
fixed ActiveModel documentation [ci skip]
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 |