summaryrefslogtreecommitdiff
path: root/app/contexts/notes/create_context.rb
blob: 36ea76ff9496cb83dfb3091fe5cbc82848a62796 (plain)
1
2
3
4
5
6
7
8
9
10
module Notes
  class CreateContext < BaseContext
    def execute
      note = project.notes.new(params[:note])
      note.author = current_user
      note.save
      note
    end
  end
end