mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Update activemodel rdoc links"
This reverts commit ddb9875513
.
Reason: The links must be relative so that they will work both in edge
and stable api sites.
This commit is contained in:
parent
d70e1a9d2b
commit
ba60686ad9
1 changed files with 12 additions and 12 deletions
|
@ -11,10 +11,10 @@ code from Rails, or monkey patch entire helpers to make them handle objects
|
|||
that did not exactly conform to the Active Record interface. This would result
|
||||
in code duplication and fragile applications that broke on upgrades. Active
|
||||
Model solves this by defining an explicit API. You can read more about the
|
||||
API in <tt>ActiveModel::Lint::Tests</tt>.
|
||||
API in ActiveModel::Lint::Tests.
|
||||
|
||||
Active Model provides a default module that implements the basic API required
|
||||
to integrate with Action Pack out of the box:
|
||||
to integrate with Action Pack out of the box: +ActiveModel::Model+.
|
||||
|
||||
class Person
|
||||
include ActiveModel::Model
|
||||
|
@ -30,7 +30,7 @@ to integrate with Action Pack out of the box:
|
|||
|
||||
It includes model name introspections, conversions, translations and
|
||||
validations, resulting in a class suitable to be used with Action Pack.
|
||||
See <tt>ActiveModel::Model</tt> for more examples.
|
||||
See +ActiveModel::Model+ for more examples.
|
||||
|
||||
Active Model also provides the following functionality to have ORM-like
|
||||
behavior out of the box:
|
||||
|
@ -53,7 +53,7 @@ behavior out of the box:
|
|||
person.clear_name
|
||||
person.clear_age
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/AttributeMethods.html]
|
||||
{Learn more}[link:classes/ActiveModel/AttributeMethods.html]
|
||||
|
||||
* Callbacks for certain operations
|
||||
|
||||
|
@ -71,7 +71,7 @@ behavior out of the box:
|
|||
This generates +before_create+, +around_create+ and +after_create+
|
||||
class methods that wrap your create method.
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Callbacks.html]
|
||||
{Learn more}[link:classes/ActiveModel/CallBacks.html]
|
||||
|
||||
* Tracking value changes
|
||||
|
||||
|
@ -88,7 +88,7 @@ behavior out of the box:
|
|||
person.save
|
||||
person.previous_changes # => {'name' => ['bob, 'robert']}
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Dirty.html]
|
||||
{Learn more}[link:classes/ActiveModel/Dirty.html]
|
||||
|
||||
* Adding +errors+ interface to objects
|
||||
|
||||
|
@ -119,7 +119,7 @@ behavior out of the box:
|
|||
person.errors.full_messages
|
||||
# => ["Name can not be nil"]
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Errors.html]
|
||||
{Learn more}[link:classes/ActiveModel/Errors.html]
|
||||
|
||||
* Model name introspection
|
||||
|
||||
|
@ -130,7 +130,7 @@ behavior out of the box:
|
|||
NamedPerson.model_name # => "NamedPerson"
|
||||
NamedPerson.model_name.human # => "Named person"
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Naming.html]
|
||||
{Learn more}[link:classes/ActiveModel/Naming.html]
|
||||
|
||||
* Observer support
|
||||
|
||||
|
@ -150,7 +150,7 @@ behavior out of the box:
|
|||
s.to_json # => "{\"name\":null}"
|
||||
s.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<serial-person...
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Serialization.html]
|
||||
{Learn more}[link:classes/ActiveModel/Serialization.html]
|
||||
|
||||
* Internationalization (i18n) support
|
||||
|
||||
|
@ -161,7 +161,7 @@ behavior out of the box:
|
|||
Person.human_attribute_name('my_attribute')
|
||||
# => "My attribute"
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Translation.html]
|
||||
{Learn more}[link:classes/ActiveModel/Translation.html]
|
||||
|
||||
* Validation support
|
||||
|
||||
|
@ -179,7 +179,7 @@ behavior out of the box:
|
|||
person.first_name = 'zoolander'
|
||||
person.valid? # => false
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validations.html]
|
||||
{Learn more}[link:classes/ActiveModel/Validations.html]
|
||||
|
||||
* Custom validators
|
||||
|
||||
|
@ -201,7 +201,7 @@ behavior out of the box:
|
|||
p.name = "Bob"
|
||||
p.valid? # => true
|
||||
|
||||
{Learn more}[http://api.rubyonrails.org/classes/ActiveModel/Validator.html]
|
||||
{Learn more}[link:classes/ActiveModel/Validator.html]
|
||||
|
||||
|
||||
== Download and installation
|
||||
|
|
Loading…
Reference in a new issue