From eeb89a6010fce509f0cb6735e1ae9dc3cc5336d1 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 11 Apr 2017 19:46:09 +0800 Subject: Avoid Rails generating complicated query, see: https://gitlab.com/gitlab-org/gitlab-ce/builds/14070787 --- app/controllers/projects/merge_requests_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 5c1f7e69ee8..e3f3b14f993 100755 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -39,7 +39,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController @collection_type = "MergeRequest" @merge_requests = merge_requests_collection @merge_requests = @merge_requests.page(params[:page]) - @merge_requests = @merge_requests.includes(merge_request_diff: :merge_request) + @merge_requests = @merge_requests.preload(merge_request_diff: :merge_request) @issuable_meta_data = issuable_meta_data(@merge_requests, @collection_type) if @merge_requests.out_of_range? && @merge_requests.total_pages != 0 -- cgit v1.2.1