aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-02-05 21:40:44 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-02-19 00:11:29 +0900
commitfb86ecd604a362355827bbf05776b847b0ded9a5 (patch)
tree8e0d28ede1e72023c636864e2874f64001a1ff94 /activerecord/CHANGELOG.md
parent5ece2e4a4459065b5efd976aebd209bbf0cab89b (diff)
downloadrails-fb86ecd604a362355827bbf05776b847b0ded9a5.tar.gz
rails-fb86ecd604a362355827bbf05776b847b0ded9a5.tar.bz2
rails-fb86ecd604a362355827bbf05776b847b0ded9a5.zip
Make `reflection.klass` raise if `polymorphic?` not to be misused
This is an alternative of #31877 to fix #31876 caused by #28808. This issue was caused by a combination of several loose implementation. * finding automatic inverse association of polymorphic without context (caused by #28808) * returning `klass` even if `polymorphic?` (exists before #28808) * loose verification by `valid_inverse_reflection?` (exists before #28808) This makes `klass` raise if `polymorphic?` not to be misused. This issue will not happen unless polymorphic `klass` is misused. Fixes #31876. Closes #31877.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 325c4abfc8..36bb5e1daf 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,11 @@
## Rails 6.0.0.alpha (Unreleased) ##
+* Make `reflection.klass` raise if `polymorphic?` not to be misused.
+
+ Fixes #31876.
+
+ *Ryuta Kamizono*
+
* Rails 6 requires Ruby 2.4.1 or newer.
*Jeremy Daer*