Module: RendersNotes

Instance Method Summary collapse

Instance Method Details

#prepare_notes_for_rendering(notes, noteable = nil) ⇒ Object

rubocop:disable Gitlab/ModuleWithInstanceVariables


5
6
7
8
9
10
11
12
13
# File 'app/controllers/concerns/renders_notes.rb', line 5

def prepare_notes_for_rendering(notes, noteable = nil)
  preload_noteable_for_regular_notes(notes)
  preload_max_access_for_authors(notes, @project)
  preload_first_time_contribution_for_authors(noteable, notes)
  preload_author_status(notes)
  Notes::RenderService.new(current_user).execute(notes)

  notes
end