mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
If dependent: nil
is valid for has_many, it also be valid for has_one
Follow up #35504. [ci skip]
This commit is contained in:
parent
c900cdfdc3
commit
6607618afd
1 changed files with 1 additions and 0 deletions
|
@ -1434,6 +1434,7 @@ module ActiveRecord
|
|||
# Controls what happens to the associated object when
|
||||
# its owner is destroyed:
|
||||
#
|
||||
# * <tt>nil</tt> do nothing (default).
|
||||
# * <tt>:destroy</tt> causes the associated object to also be destroyed
|
||||
# * <tt>:delete</tt> causes the associated object to be deleted directly from the database (so callbacks will not execute)
|
||||
# * <tt>:nullify</tt> causes the foreign key to be set to +NULL+. Polymorphic type column is also nullified
|
||||
|
|
Loading…
Reference in a new issue