From: Tom Hughes Date: Sun, 14 Oct 2012 11:32:55 +0000 (+0100) Subject: Allow an optional comment to be given when closing a note X-Git-Tag: live~5096^2~87 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8b917ccd60324997a33c04432ce4d079fc015b99?hp=f48d8f41d8e4f85759ec8150da31fd86b18ea253 Allow an optional comment to be given when closing a note --- diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 528907d16..bf9d0187f 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -131,6 +131,7 @@ class NotesController < ApplicationController # Extract the arguments id = params[:id].to_i + comment = params[:text] name = params[:name] # Find the note and check it is valid @@ -142,7 +143,7 @@ class NotesController < ApplicationController Note.transaction do @note.close - add_comment(@note, nil, name, "closed") + add_comment(@note, comment, name, "closed") end # Return a copy of the updated note