diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-26 12:37:29 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-26 12:37:29 -0700 |
commit | 1152219fa2d7968f864b3a5ebb78d2f95ca4fb5c (patch) | |
tree | 21a23a8e4b918f992f0f38e4fa7fa78d47f28468 /activerecord/test/cases/multiparameter_attributes_test.rb | |
parent | 8e3b1a632c15e8c7f708ab222a81faaad8e3410e (diff) | |
download | rails-1152219fa2d7968f864b3a5ebb78d2f95ca4fb5c.tar.gz rails-1152219fa2d7968f864b3a5ebb78d2f95ca4fb5c.tar.bz2 rails-1152219fa2d7968f864b3a5ebb78d2f95ca4fb5c.zip |
Improve consistency of counter caches updating in memory
When we made sure that the counter gets updated in memory, we only did
it on the has many side. The has many side only does the update if the
belongs to cannot. The belongs to side was updated to update the counter
cache (if it is able). This means that we need to check if the
belongs_to is able to update in memory on the has_many side.
We also found an inconsistency where the reflection names were used to
grab the association which should update the counter cache. Since
reflection names are now strings, this means it was using a different
instance than the one which would have the inverse instance set.
Fixes #18689
[Sean Griffin & anthonynavarre]
Diffstat (limited to 'activerecord/test/cases/multiparameter_attributes_test.rb')
0 files changed, 0 insertions, 0 deletions