diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-09-07 18:42:01 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-07 18:42:01 +0300 |
commit | b027b3e037a328cc8a699d6befa796039c03b44b (patch) | |
tree | 65cd8b73fa9e8e94595e73acc10f81f1880e0c29 /app/controllers | |
parent | 99f1a222dc8bd17f3becf75b172ab645368a4566 (diff) | |
parent | cd1d5b244072c6701e77c6bd7be9e9a0d60f8967 (diff) |
Merge branch 'osw-write-cache-upon-mr-creation-and-cache-refactoring' into 'master'
Write diff highlighting cache upon MR creation (refactors caching)
Closes #50204
See merge request gitlab-org/gitlab-ce!21489
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/merge_requests/diffs_controller.rb | 2 |
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 |