mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
preheat habtm column cache
This commit is contained in:
parent
da06ae88ab
commit
cb0aa02e74
1 changed files with 1 additions and 0 deletions
|
@ -242,6 +242,7 @@ class NestedThroughAssociationsTest < ActiveRecord::TestCase
|
|||
end
|
||||
|
||||
def test_has_many_through_has_and_belongs_to_many_with_has_many_source_reflection_preload
|
||||
Category.includes(:post_comments).to_a # preheat cache
|
||||
categories = assert_queries(4) { Category.includes(:post_comments).to_a.sort_by(&:id) }
|
||||
greetings, more = comments(:greetings), comments(:more_greetings)
|
||||
|
||||
|
|
Loading…
Reference in a new issue