gitlab-org--gitlab-foss/app/contexts/notes/create_context.rb

13 lines
293 B
Ruby
Raw Normal View History

2012-07-31 01:32:49 -04:00
module Notes
class CreateContext < BaseContext
def execute
note = project.notes.new(params[:note])
note.author = current_user
2012-10-29 14:37:37 -04:00
note.notify = params[:notify].present?
note.notify_author = params[:notify_author].present?
2012-07-31 01:32:49 -04:00
note.save
note
end
end
end