summaryrefslogtreecommitdiff
path: root/app/services/notes/update_service.rb
blob: c22a9333ef6889d9f36a1992a9b675b5cb7d92da (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.reset_events_cache

      note
    end
  end
end