1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[ci skip] Include ActiveModel::Model in a class instead of inheriting

This commit is contained in:
Akshay Vishnoi 2014-05-30 03:09:57 +05:30
parent 6daa46621b
commit fd3f3c5348

View file

@ -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"