aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-02-03 13:25:15 -0700
committerSean Griffin <sean@thoughtbot.com>2015-02-03 13:28:07 -0700
commit23bb8d77c6c5ace445659d56cf5df2adcf6c8dc3 (patch)
treeb5792b0fd965091f07e832f19bf1b3a4122aa7e0 /activerecord/CHANGELOG.md
parent4a62724c59d387991055dbcb86d725e26a986fda (diff)
downloadrails-23bb8d77c6c5ace445659d56cf5df2adcf6c8dc3.tar.gz
rails-23bb8d77c6c5ace445659d56cf5df2adcf6c8dc3.tar.bz2
rails-23bb8d77c6c5ace445659d56cf5df2adcf6c8dc3.zip
Correct errors in counter cache updating
The cache name should be converted to a string when given, not compared as a symbol. This edge case is already adequately covered by our tests, but was masked by another issue where we were incorrectly updating the counter cache twice. When paired with a bug where we didn't update the counter cache because we couldn't find a match with the name, this made it look like everything was working fine. Fixes #10865.
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 af692adad6..0105dfa78c 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,10 @@
+* Fixed several edge cases which could result in a counter cache updating
+ twice or not updating at all for `has_many` and `has_many :through`.
+
+ Fixes #10865.
+
+ *Sean Griffin*
+
* Foreign keys added by migrations were given random, generated names. This
meant a different `structure.sql` would be generated every time a developer
ran migrations on their machine.