aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/association_basics.md
diff options
context:
space:
mode:
authorJuanito Fatas <katehuang0320@gmail.com>2013-10-17 02:45:04 +0800
committerJuanito Fatas <katehuang0320@gmail.com>2013-10-17 02:45:04 +0800
commit01d75f038e140c3f3ece54d2ecc3e4da4b62c98b (patch)
tree42b871496f33eeda178d951bb6b2b801fbf4afe4 /guides/source/association_basics.md
parentf2ca5aa5c2e9fed43ab11937906d98bd436ab820 (diff)
downloadrails-01d75f038e140c3f3ece54d2ecc3e4da4b62c98b.tar.gz
rails-01d75f038e140c3f3ece54d2ecc3e4da4b62c98b.tar.bz2
rails-01d75f038e140c3f3ece54d2ecc3e4da4b62c98b.zip
[ci skip] Fix number of methods added by association.
Also clean up some trailing spaces on line 1143-1146.
Diffstat (limited to 'guides/source/association_basics.md')
-rw-r--r--guides/source/association_basics.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 91b268d766..c0482f6106 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -718,7 +718,7 @@ The `belongs_to` association creates a one-to-one match with another model. In d
#### Methods Added by `belongs_to`
-When you declare a `belongs_to` association, the declaring class automatically gains four methods related to the association:
+When you declare a `belongs_to` association, the declaring class automatically gains five methods related to the association:
* `association(force_reload = false)`
* `association=(associate)`
@@ -1022,7 +1022,7 @@ The `has_one` association creates a one-to-one match with another model. In data
#### Methods Added by `has_one`
-When you declare a `has_one` association, the declaring class automatically gains four methods related to the association:
+When you declare a `has_one` association, the declaring class automatically gains five methods related to the association:
* `association(force_reload = false)`
* `association=(associate)`
@@ -1140,10 +1140,10 @@ Controls what happens to the associated object when its owner is destroyed:
* `:restrict_with_exception` causes an exception to be raised if there is an associated record
* `:restrict_with_error` causes an error to be added to the owner if there is an associated object
-It's necessary not to set or leave `:nullify` option for those associations
-that have `NOT NULL` database constraints. If you don't set `dependent` to
-destroy such associations you won't be able to change the associated object
-because initial associated object foreign key will be set to unallowed `NULL`
+It's necessary not to set or leave `:nullify` option for those associations
+that have `NOT NULL` database constraints. If you don't set `dependent` to
+destroy such associations you won't be able to change the associated object
+because initial associated object foreign key will be set to unallowed `NULL`
value.
##### `:foreign_key`
@@ -1289,7 +1289,7 @@ The `has_many` association creates a one-to-many relationship with another model
#### Methods Added by `has_many`
-When you declare a `has_many` association, the declaring class automatically gains 13 methods related to the association:
+When you declare a `has_many` association, the declaring class automatically gains 16 methods related to the association:
* `collection(force_reload = false)`
* `collection<<(object, ...)`
@@ -1778,7 +1778,7 @@ The `has_and_belongs_to_many` association creates a many-to-many relationship wi
#### Methods Added by `has_and_belongs_to_many`
-When you declare a `has_and_belongs_to_many` association, the declaring class automatically gains 13 methods related to the association:
+When you declare a `has_and_belongs_to_many` association, the declaring class automatically gains 16 methods related to the association:
* `collection(force_reload = false)`
* `collection<<(object, ...)`