From 1bf61afcef4413d9ed5a8d84f3261fafea4afd08 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 30 Jul 2018 20:05:01 +1000 Subject: [PATCH] feat(index): eager load latest verification for consumer and provider --- lib/pact_broker/index/service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pact_broker/index/service.rb b/lib/pact_broker/index/service.rb index 6176ea4e0..bead4cca3 100644 --- a/lib/pact_broker/index/service.rb +++ b/lib/pact_broker/index/service.rb @@ -28,6 +28,7 @@ def self.find_index_items options = {} rows = rows.eager(:consumer_version_tags) .eager(:provider_version_tags) .eager(:latest_verification_for_consumer_version_tag) + .eager(:latest_verification_for_consumer_and_provider) end rows = rows.all.group_by(&:pact_publication_id).values.collect{ | rows| Matrix::AggregatedRow.new(rows) }