aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2013-12-31 02:44:27 +0530
committerVipul A M <vipulnsward@gmail.com>2013-12-31 02:47:37 +0530
commitbb17c3b2105da30ef3260c3b489da85e4865eaa5 (patch)
tree8c3e4db574a16ca37cd31072f83ce3ec712101f5 /activerecord/CHANGELOG.md
parent15e2eb42a7b1c251defd088ac65a89f152a307f6 (diff)
downloadrails-bb17c3b2105da30ef3260c3b489da85e4865eaa5.tar.gz
rails-bb17c3b2105da30ef3260c3b489da85e4865eaa5.tar.bz2
rails-bb17c3b2105da30ef3260c3b489da85e4865eaa5.zip
https://github.com/rails/rails/commit/2075f39d726cef361170218fd16421fc52bed5a8 introduced a regression in includes/preloades
by calling `read_attribute` on an association when preloading takes places, instead of using loaded records in `association.target`. tl;dr Records are not made properly available via `read_attribute` when preloding in simultaneous, but value of `@loaded` is already set true, and records concatenated in `association.target` on an association object. When `@loaded` is true we return an object of `AlreadyLoaded` in preload_for. In `AlreadyLoaded` to return preloaded records we make wrong use of `read_attribute`, instead of `target` records. The regression is fixed by making use of the loaded records in `association.target` when the preloading takes place. Fixes #13437
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 6b17d6b265..d06a43f0f2 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,10 @@
+* Fixed regression on preload/includes with multiple arguments failing in certain conditions,
+ raising a NoMethodError internally by calling `reflect_on_association` for `NilClass:Class`.
+
+ Fixes #13437.
+
+ *Vipul A M*, *khustochka*
+
* Deprecated use of string argument as a configuration lookup in `ActiveRecord::Base.establish_connection`. Instead, a symbol must be given.
*José Valim*