create_context.rb 293 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 module Notes class CreateContext < BaseContext def execute note = project.notes.new(params[:note]) note.author = current_user note.notify = params[:notify].present? note.notify_author = params[:notify_author].present? note.save note end end end