gitlabhq/gitlabhq

View on GitHub
app/contexts/notes/create_context.rb

Summary

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