aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-05-30 03:09:57 +0530
committerAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-05-30 03:09:57 +0530
commitfd3f3c5348008c28d1be4fafabe981c7cae88936 (patch)
treed1e9c5221f9826fdf70ae5d3319bae08a12b9cdb /activemodel/lib/active_model
parent6daa46621b7145fcf948f48bed01d3cfe9221613 (diff)
downloadrails-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/lib/active_model')
-rw-r--r--activemodel/lib/active_model/naming.rb5
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"