aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2015-09-29 11:59:18 -0400
committerArthur Nogueira Neves <github@arthurnn.com>2015-09-29 11:59:18 -0400
commit2baa752527399d9bfb584baad686ced63c9b91ad (patch)
tree70012883f24cd8912d405f1dab9a35f6ab3d36a5
parent97b980b4e61aea3cee429bdee4b2eae2329905cd (diff)
parent391043ab04007bfd4c4c4c8e8d3308c1eae60175 (diff)
downloadrails-2baa752527399d9bfb584baad686ced63c9b91ad.tar.gz
rails-2baa752527399d9bfb584baad686ced63c9b91ad.tar.bz2
rails-2baa752527399d9bfb584baad686ced63c9b91ad.zip
Merge pull request #21816 from nburkley/has-many-documentation
Fix documentation for has_many dependant options.
-rw-r--r--guides/source/association_basics.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 60790b33a4..999c533fb3 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -932,8 +932,11 @@ If you set the `:dependent` option to:
* `:destroy`, when the object is destroyed, `destroy` will be called on its
associated objects.
-* `:delete`, when the object is destroyed, all its associated objects will be
+* `:delete_all`, when the object is destroyed, all its associated objects will be
deleted directly from the database without calling their `destroy` method.
+* `:nullify`, causes the foreign key to be set to `NULL`. Callbacks are not executed.
+* `: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
WARNING: You should not specify this option on a `belongs_to` association that is connected with a `has_many` association on the other class. Doing so can lead to orphaned records in your database.