mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix bad format [ci skip]
This commit is contained in:
parent
92a6cf0acd
commit
0631b26316
1 changed files with 7 additions and 7 deletions
|
@ -2,11 +2,11 @@ module ActiveModel
|
||||||
|
|
||||||
# == Active Model Basic Model
|
# == Active Model Basic Model
|
||||||
#
|
#
|
||||||
# Includes the required interface for an object to interact with +ActionPack+,
|
# Includes the required interface for an object to interact with <tt>ActionPack</tt>,
|
||||||
# using different +ActiveModel+ modules. It includes model name introspections,
|
# using different <tt>ActiveModel</tt> modules. It includes model name introspections,
|
||||||
# conversions, translations and validations. Besides that, it allows you to
|
# conversions, translations and validations. Besides that, it allows you to
|
||||||
# initialize the object with a hash of attributes, pretty much like
|
# initialize the object with a hash of attributes, pretty much like
|
||||||
# +ActiveRecord+ does.
|
# <tt>ActiveRecord</tt> does.
|
||||||
#
|
#
|
||||||
# A minimal implementation could be:
|
# A minimal implementation could be:
|
||||||
#
|
#
|
||||||
|
@ -19,8 +19,8 @@ module ActiveModel
|
||||||
# person.name # => 'bob'
|
# person.name # => 'bob'
|
||||||
# person.age # => 18
|
# person.age # => 18
|
||||||
#
|
#
|
||||||
# Note that, by default, +ActiveModel::Model+ implements +persisted?+ to
|
# Note that, by default, <tt>ActiveModel::Model</tt> implements <tt>persisted?</tt> to
|
||||||
# return +false+, which is the most common case. You may want to override it
|
# return <tt>false</tt>, which is the most common case. You may want to override it
|
||||||
# in your class to simulate a different scenario:
|
# in your class to simulate a different scenario:
|
||||||
#
|
#
|
||||||
# class Person
|
# class Person
|
||||||
|
@ -35,7 +35,7 @@ module ActiveModel
|
||||||
# person = Person.new(:id => 1, :name => 'bob')
|
# person = Person.new(:id => 1, :name => 'bob')
|
||||||
# person.persisted? # => true
|
# person.persisted? # => true
|
||||||
#
|
#
|
||||||
# Also, if for some reason you need to run code on +initialize+, make sure you
|
# Also, if for some reason you need to run code on <tt>initialize</tt>, make sure you
|
||||||
# call super if you want the attributes hash initialization to happen.
|
# call super if you want the attributes hash initialization to happen.
|
||||||
#
|
#
|
||||||
# class Person
|
# class Person
|
||||||
|
@ -52,7 +52,7 @@ module ActiveModel
|
||||||
# person.omg # => true
|
# person.omg # => true
|
||||||
#
|
#
|
||||||
# For more detailed information on other functionalities available, please refer
|
# For more detailed information on other functionalities available, please refer
|
||||||
# to the specific modules included in +ActiveModel::Model+ (see below).
|
# to the specific modules included in <tt>ActiveModel::Model</tt> (see below).
|
||||||
module Model
|
module Model
|
||||||
def self.included(base)
|
def self.included(base)
|
||||||
base.class_eval do
|
base.class_eval do
|
||||||
|
|
Loading…
Reference in a new issue