gitlab-org--gitlab-foss/app/services/notes/create_service.rb
Dmitriy Zaporozhets 0f080a9410
Make sure note.system is false if created by user
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-20 14:07:42 +02:00

11 lines
215 B
Ruby

module Notes
class CreateService < BaseService
def execute
note = project.notes.new(params[:note])
note.author = current_user
note.system = false
note.save
note
end
end
end