Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update_service.rb « notes « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c2f08e5963c51e0e2c2f4b44490e7edb638f777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Notes
  class UpdateService < BaseService
    def execute(note)
      return note unless note.editable?

      note.update_attributes(params.merge(updated_by: current_user))
      note.create_new_cross_references!
      note.reset_events_cache

      note
    end
  end
end