Fix flaky test in HasManyThroughDisableJoinsAssociationsTest

This commit is contained in:
DmitryTsepelev 2021-11-15 21:46:01 +03:00
parent 27f17b98d6
commit 5d212a591e
1 changed files with 2 additions and 2 deletions

View File

@ -53,13 +53,13 @@ class Author < ActiveRecord::Base
has_many :ratings, through: :comments
has_many :good_ratings,
-> { where("ratings.value > 5") },
-> { where("ratings.value > 5").order(:id) },
through: :comments,
source: :ratings
has_many :no_joins_ratings, through: :no_joins_comments, disable_joins: :true, source: :ratings
has_many :no_joins_good_ratings,
-> { where("ratings.value > 5") },
-> { where("ratings.value > 5").order(:id) },
through: :comments,
source: :ratings,
disable_joins: true