1
0
Fork 0
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:
Ryuta Kamizono 2020-01-16 07:05:20 +09:00
parent c900cdfdc3
commit 6607618afd

View file

@ -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