diff options
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/README.rdoc | 9 | ||||
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index 500be2a04a..f6beff14e1 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] @@ -262,6 +262,11 @@ API documentation is at * http://api.rubyonrails.org -Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here: +Bug reports can be filed for the Ruby on Rails project here: * https://github.com/rails/rails/issues + +Feature requests should be discussed on the rails-core mailing list here: + +* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core + diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 11ebfe6cc0..5219de2606 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 @@ -218,10 +218,11 @@ module ActiveModel # used to retrieve all kinds of naming-related information # (See ActiveModel::Name for more information). # - # class Person < ActiveModel::Model + # class Person + # include ActiveModel::Model # end # - # Person.model_name # => Person + # Person.model_name.name # => "Person" # Person.model_name.class # => ActiveModel::Name # Person.model_name.singular # => "person" # Person.model_name.plural # => "people" |