From 7547e86579a931c31f0b3dd1047e2519d5824fd5 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 6 Apr 2017 23:43:15 +0800 Subject: Use preload because we don't want join here --- app/serializers/pipeline_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb index 0af9ef0e3f7..e7a9df8ac4e 100644 --- a/app/serializers/pipeline_serializer.rb +++ b/app/serializers/pipeline_serializer.rb @@ -13,7 +13,7 @@ class PipelineSerializer < BaseSerializer def represent(resource, opts = {}) if resource.is_a?(ActiveRecord::Relation) - resource = resource.includes([ + resource = resource.preload([ :retryable_builds, :cancelable_statuses, :trigger_requests, -- cgit v1.2.1