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:
parent
6daa46621b
commit
fd3f3c5348
1 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue