From 01dd86696a6174f3f350926889e159eca38d240e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Tue, 28 Aug 2018 07:39:43 +1000 Subject: [PATCH] feat: eager load pacticipant labels for /pacticipants resource --- lib/pact_broker/pacticipants/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact_broker/pacticipants/repository.rb b/lib/pact_broker/pacticipants/repository.rb index 9b88da06e..101132edb 100644 --- a/lib/pact_broker/pacticipants/repository.rb +++ b/lib/pact_broker/pacticipants/repository.rb @@ -23,7 +23,7 @@ def find_all def find options = {} query = PactBroker::Domain::Pacticipant.select_all_qualified query = query.label(options[:label_name]) if options[:label_name] - query.order_ignore_case(Sequel[:pacticipants][:name]).all + query.order_ignore_case(Sequel[:pacticipants][:name]).eager(:labels).all end def find_all_pacticipant_versions_in_reverse_order name