gitlabhq/app/contexts/notes/create_context.rb

11 lines
189 B
Ruby
Raw Normal View History

2012-07-31 07:32:49 +02:00
module Notes
class CreateContext < BaseContext
def execute
note = project.notes.new(params[:note])
note.author = current_user
note.save
note
end
end
end