aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikac.hu>2015-07-15 14:07:45 -0400
committerPrem Sichanugrist <s@sikac.hu>2015-07-15 14:07:45 -0400
commit6eae366d0d2e5d5211eeaf955f56bd1dc6836758 (patch)
tree4f2b2bf0b715fdde906b92a9722e512644711df2 /activerecord/CHANGELOG.md
parent64c1264419f766a306eba0418c1030b87489ea67 (diff)
downloadrails-6eae366d0d2e5d5211eeaf955f56bd1dc6836758.tar.gz
rails-6eae366d0d2e5d5211eeaf955f56bd1dc6836758.tar.bz2
rails-6eae366d0d2e5d5211eeaf955f56bd1dc6836758.zip
Deprecate force association reload by passing true
This is to simplify the association API, as you can call `reload` on the association proxy or the parent object to get the same result. For collection association, you can call `#reload` on association proxy to force a reload: @user.posts.reload # Instead of @user.posts(true) For singular association, you can call `#reload` on the parent object to clear its association cache then call the association method: @user.reload.profile # Instead of @user.profile(true) Passing a truthy argument to force association to reload will be removed in Rails 5.1.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index e3ad9ff3b1..237b07f653 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,21 @@
+* Deprecate force association reload by passing a truthy argument to
+ association method.
+
+ For collection association, you can call `#reload` on association proxy to
+ force a reload:
+
+ @user.posts.reload # Instead of @user.posts(true)
+
+ For singular association, you can call `#reload` on the parent object to
+ clear its association cache then call the association method:
+
+ @user.reload.profile # Instead of @user.profile(true)
+
+ Passing a truthy argument to force association to reload will be removed in
+ Rails 5.1.
+
+ *Prem Sichanugrist*
+
* Replaced `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`
from the concurrent-ruby gem.