summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2018-09-04 17:06:34 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2018-09-07 10:07:18 -0300
commitcd1d5b244072c6701e77c6bd7be9e9a0d60f8967 (patch)
tree56dc6c7e96e61cc47b08776152ca21d9e5708c57 /app/controllers
parentd73541d006ce3d0261cf082dac5ae605dfe7a848 (diff)
downloadgitlab-ce-cd1d5b244072c6701e77c6bd7be9e9a0d60f8967.tar.gz
Cache diff highlighting upon Merge Request creation (refactors diff caching)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/merge_requests/diffs_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/merge_requests/diffs_controller.rb b/app/controllers/projects/merge_requests/diffs_controller.rb
index 48e02581d54..34de554212f 100644
--- a/app/controllers/projects/merge_requests/diffs_controller.rb
+++ b/app/controllers/projects/merge_requests/diffs_controller.rb
@@ -21,6 +21,8 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic
def render_diffs
@environment = @merge_request.environments_for(current_user).last
+ @diffs.write_cache
+
render json: DiffsSerializer.new(current_user: current_user).represent(@diffs, additional_attributes)
end