gitlab-org--gitlab-foss/app/contexts/notes/create_context.rb
2013-03-28 15:39:18 +02:00

10 lines
189 B
Ruby

module Notes
class CreateContext < BaseContext
def execute
note = project.notes.new(params[:note])
note.author = current_user
note.save
note
end
end
end