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
|
2012-10-29 19:37:37 +01:00
|
|
|
note.notify = params[:notify].present?
|
|
|
|
note.notify_author = params[:notify_author].present?
|
2012-07-31 07:32:49 +02:00
|
|
|
note.save
|
|
|
|
note
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|