debian-mirror-gitlab/app/services/notes/update_service.rb
2015-10-24 18:46:33 +05:30

13 lines
281 B
Ruby

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