]> git.openstreetmap.org Git - rails.git/commitdiff
Allow an optional comment to be given when closing a note
authorTom Hughes <tom@compton.nu>
Sun, 14 Oct 2012 11:32:55 +0000 (12:32 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 14 Oct 2012 15:01:35 +0000 (16:01 +0100)
app/controllers/notes_controller.rb

index 528907d16b9d1ab6c4c1cfeb25d79cd689e27c06..bf9d0187fd00c9896b08a7f8246fef41301d0ce1 100644 (file)
@@ -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