summaryrefslogtreecommitdiff
path: root/app/serializers/pipeline_serializer.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-04-07 16:20:17 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-04-07 16:20:17 +0800
commit3aed06cfa387406c2e0257a8783bc05b53d4385a (patch)
tree91d12caf54a468bc272d92bca4542722a42e2033 /app/serializers/pipeline_serializer.rb
parent964814e99a30dd9fb0194e64cc01fee79bd027aa (diff)
parentc970fa973d482c50820db75d08d74bd5c1e9d475 (diff)
downloadgitlab-ce-3aed06cfa387406c2e0257a8783bc05b53d4385a.tar.gz
Merge remote-tracking branch 'upstream/master' into test-pg-mysql
* upstream/master: (590 commits) Fixes failing spec Fix icon name error Rewrite system note helper Change edit icon Leave icon area blank if legacy note; remove diamond icon Fix positioning of note icons Fix newline errors Add remaining system note icons Add system notes icon helper; add icons Fixed specs Updated JS that was causing the hints to appear & then disappear Update tests Fix broken spinach test Reuse code Improve shortcuts code Adds ShortcutsDashboardNavigation to globals comment since its a global variable Fix shortcut specs Reorganize shortcut help menu Change todos shortcut to shift Change shortcuts Switch global shortcuts to shift; reuse key styles from help menu ...
Diffstat (limited to 'app/serializers/pipeline_serializer.rb')
-rw-r--r--app/serializers/pipeline_serializer.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 7829df9fada..e7a9df8ac4e 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -13,7 +13,15 @@ class PipelineSerializer < BaseSerializer
def represent(resource, opts = {})
if resource.is_a?(ActiveRecord::Relation)
- resource = resource.includes(project: :namespace)
+ resource = resource.preload([
+ :retryable_builds,
+ :cancelable_statuses,
+ :trigger_requests,
+ :project,
+ { pending_builds: :project },
+ { manual_actions: :project },
+ { artifacts: :project }
+ ])
end
if paginated?