aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorLaerti <laertis.pappas@gmail.com>2019-01-15 15:03:20 +0100
committerRyuta Kamizono <kamipo@gmail.com>2019-01-15 23:03:20 +0900
commit41ffddbc8b7faec66a26bd48dfd36a9def6cc23f (patch)
tree578282157b3386a787237e9f8fa934010aa6233c /activerecord/CHANGELOG.md
parente4213e7c682f2b4bf19383ea1af1681c81c96ac5 (diff)
downloadrails-41ffddbc8b7faec66a26bd48dfd36a9def6cc23f.tar.gz
rails-41ffddbc8b7faec66a26bd48dfd36a9def6cc23f.tar.bz2
rails-41ffddbc8b7faec66a26bd48dfd36a9def6cc23f.zip
Refs #28025 nullify *_type column on polymorphic associations on :nu… (#28078)
This PR addresses the issue described in #28025. On `dependent: :nullify` strategy only the foreign key of the relation is nullified. However on polymorphic associations the `*_type` column is not nullified leaving the record with a NULL `*_id` but the `*_type` column is present.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index f1a5e58da6..e987a0e279 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,8 @@
+* Set polymorphic type column to NULL on `dependent: :nullify` strategy.
+
+ On polymorphic associations both the foreign key and the foreign type columns will be set to NULL.
+
+ *Laerti Papa*
* Allow `ActionController::Params` as argument of `ActiveRecord::Base#exists?`.