aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2015-03-18 08:04:12 -0400
committereileencodes <eileencodes@gmail.com>2015-03-18 08:13:53 -0400
commitcce5126eb28764cc6dee2a9f92e2edcec4715fbe (patch)
treef6881f61f9b77c0f649f05f4f6b36a0cb6ea4000 /activerecord/CHANGELOG.md
parent8adfba360be5e2220208506a7b8d2089bd596199 (diff)
downloadrails-cce5126eb28764cc6dee2a9f92e2edcec4715fbe.tar.gz
rails-cce5126eb28764cc6dee2a9f92e2edcec4715fbe.tar.bz2
rails-cce5126eb28764cc6dee2a9f92e2edcec4715fbe.zip
Add `clear_association_scope_cache` method
In the tests if I were to call `post.categorizations.to_a` and then later call `post.categorizations.to_a` expecting to have different results the 2 queries would be the same because of the caching involved in `@association_scope_cache`. The chain gets cached and the queries will be the same even if they are not supposed to be (i.e. testing an order dependent scoping issue). I found this issue because I was working on a bug with cached scoped in hm:t and hm:t polymorphic relationships but `capture_sql` was outputting the wrong SQL to write a good test.
Diffstat (limited to 'activerecord/CHANGELOG.md')
0 files changed, 0 insertions, 0 deletions