diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-02-19 04:33:42 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-02-19 04:33:42 -0800 |
commit | b4e053e867232e28c7b99b0d935161d1e4559ced (patch) | |
tree | f73e5e490d1e5de640f83797a2b19325e2f82fb5 /activerecord/CHANGELOG.md | |
parent | 46b65ba274bea6f8d52926e4b243db28d6377fc0 (diff) | |
parent | 587f563c40cfada296d6e8d6bbe3c4d7fc6ce93b (diff) | |
download | rails-b4e053e867232e28c7b99b0d935161d1e4559ced.tar.gz rails-b4e053e867232e28c7b99b0d935161d1e4559ced.tar.bz2 rails-b4e053e867232e28c7b99b0d935161d1e4559ced.zip |
Merge pull request #9322 from senny/backport_9252
don't cache invalid subsets when preloading hmt associations.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index febead3067..cd105b8355 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,28 @@ ## unreleased ## +* Preloading `has_many :through` associations with conditions won't + cache the `:through` association. This will prevent invalid + subsets to be cached. + Fixes #8423. + Backport #9252. + + Example: + + class User + has_many :posts + has_many :recent_comments, -> { where('created_at > ?', 1.week.ago) }, :through => :posts + end + + a_user = User.includes(:recent_comments).first + + # this is preloaded + a_user.recent_comments + + # fetching the recent_comments through the posts association won't preload it. + a_user.posts + + *Yves Senn* + * Fix handling of dirty time zone aware attributes Previously, when `time_zone_aware_attributes` were enabled, after |