diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-05-30 03:09:57 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-05-30 03:09:57 +0530 |
commit | fd3f3c5348008c28d1be4fafabe981c7cae88936 (patch) | |
tree | d1e9c5221f9826fdf70ae5d3319bae08a12b9cdb /activemodel | |
parent | 6daa46621b7145fcf948f48bed01d3cfe9221613 (diff) | |
download | rails-fd3f3c5348008c28d1be4fafabe981c7cae88936.tar.gz rails-fd3f3c5348008c28d1be4fafabe981c7cae88936.tar.bz2 rails-fd3f3c5348008c28d1be4fafabe981c7cae88936.zip |
[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" |