diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-01-16 22:00:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 22:00:51 +0100 |
commit | cb3f78aa7c8f14921501703ed0780f2a428bc6a1 (patch) | |
tree | 8eb4807d949160d38a3d239ea33d37318d38b5aa /activerecord/lib/active_record/associations.rb | |
parent | d49899c15431104f8dad374363bac57479b4bd39 (diff) | |
parent | 7e52e3b1c004eb22521c844b6adf69a2689cc1da (diff) | |
download | rails-cb3f78aa7c8f14921501703ed0780f2a428bc6a1.tar.gz rails-cb3f78aa7c8f14921501703ed0780f2a428bc6a1.tar.bz2 rails-cb3f78aa7c8f14921501703ed0780f2a428bc6a1.zip |
Merge branch 'master' into db_system_change_command
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index fb1df00dc8..7bdbd8ce69 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1293,7 +1293,8 @@ module ActiveRecord # # * <tt>:destroy</tt> causes all the associated objects to also be destroyed. # * <tt>:delete_all</tt> causes all the associated objects to be deleted directly from the database (so callbacks will not be executed). - # * <tt>:nullify</tt> causes the foreign keys to be set to +NULL+. Callbacks are not executed. + # * <tt>:nullify</tt> causes the foreign keys to be set to +NULL+. Polymorphic type will also be nullified + # on polymorphic associations. Callbacks are not executed. # * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there are any associated records. # * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there are any associated objects. # @@ -1436,7 +1437,8 @@ module ActiveRecord # # * <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+. Callbacks are not executed. + # * <tt>:nullify</tt> causes the foreign key to be set to +NULL+. Polymorphic type column is also nullified + # on polymorphic associations. Callbacks are not executed. # * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there is an associated record # * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there is an associated object # |