[ci skip] Include ActiveModel::Model in a class instead of inheriting
This commit is contained in:
parent
6daa46621b
commit
fd3f3c5348
|
@ -218,10 +218,11 @@ module ActiveModel
|
||||||
# used to retrieve all kinds of naming-related information
|
# used to retrieve all kinds of naming-related information
|
||||||
# (See ActiveModel::Name for more information).
|
# (See ActiveModel::Name for more information).
|
||||||
#
|
#
|
||||||
# class Person < ActiveModel::Model
|
# class Person
|
||||||
|
# include ActiveModel::Model
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# Person.model_name # => Person
|
# Person.model_name.name # => "Person"
|
||||||
# Person.model_name.class # => ActiveModel::Name
|
# Person.model_name.class # => ActiveModel::Name
|
||||||
# Person.model_name.singular # => "person"
|
# Person.model_name.singular # => "person"
|
||||||
# Person.model_name.plural # => "people"
|
# Person.model_name.plural # => "people"
|
||||||
|
|
Loading…
Reference in New Issue