1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix flaky test in HasManyThroughDisableJoinsAssociationsTest

This commit is contained in:
DmitryTsepelev 2021-11-15 21:46:01 +03:00
parent 27f17b98d6
commit 5d212a591e

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