diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-29 18:59:51 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-29 18:59:51 -0300 |
commit | aecf76fcde37ca31d5520f49f5e238a7161869a3 (patch) | |
tree | d1e9c5221f9826fdf70ae5d3319bae08a12b9cdb /activemodel | |
parent | 6daa46621b7145fcf948f48bed01d3cfe9221613 (diff) | |
parent | fd3f3c5348008c28d1be4fafabe981c7cae88936 (diff) | |
download | rails-aecf76fcde37ca31d5520f49f5e238a7161869a3.tar.gz rails-aecf76fcde37ca31d5520f49f5e238a7161869a3.tar.bz2 rails-aecf76fcde37ca31d5520f49f5e238a7161869a3.zip |
Merge pull request #15414 from akshay-vishnoi/doc_changes
[ci skip] Include ActiveModel::Model in a class instead of inheriting
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 2a428687c5..5219de2606 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -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" |