diff options
author | Robert Speicher <robert@gitlab.com> | 2018-10-08 21:49:41 +0300 |
---|---|---|
committer | Cindy Pallares <cindy@gitlab.com> | 2018-10-12 00:33:14 +0300 |
commit | d64bc275d814c0ff26e4282677a39eaa4a668f80 (patch) | |
tree | 9421712ecf9c475dae4c634bdc0924b9960374ae /app | |
parent | 37308a9a9b6ba05fb6e06a9188e947ada2318ba9 (diff) |
Merge branch 'osw-remove-dead-code-on-mr-show' into 'master'
Removes expensive dead code on main MR page request
Closes #51172
See merge request gitlab-org/gitlab-ce!22153
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 6 | ||||
-rw-r--r-- | app/helpers/notes_helper.rb | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 6a5da9b8292..8bc3a81d771 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -44,12 +44,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo @noteable = @merge_request @commits_count = @merge_request.commits_count - # TODO cleanup- Fatih Simon Create an issue to remove these after the refactoring - # we no longer render notes here. I see it will require a small frontend refactoring, - # since we gather some data from this collection. - @discussions = @merge_request.discussions - @notes = prepare_notes_for_rendering(@discussions.flat_map(&:notes), @noteable) - labels set_pipeline_variables diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index e0905584803..033686823a2 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -142,7 +142,7 @@ module NotesHelper def initial_notes_data(autocomplete) { notesUrl: notes_url, - notesIds: @notes.map(&:id), + notesIds: @noteable.notes.pluck(:id), # rubocop: disable CodeReuse/ActiveRecord now: Time.now.to_i, diffView: diff_view, enableGFM: { |