From: Tom Hughes Date: Mon, 8 Apr 2013 20:29:41 +0000 (+0100) Subject: Allow a comment to be supplied when hiding a note X-Git-Tag: live~5117^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/030bb31ec1a4f3b20f82ed7e4395189ecb8f5345?ds=sidebyside Allow a comment to be supplied when hiding a note --- diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index db9638203..e79be2e8d 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -195,6 +195,7 @@ class NotesController < ApplicationController # Extract the arguments id = params[:id].to_i + comment = params[:text] # Find the note and check it is valid note = Note.find(id) @@ -206,7 +207,7 @@ class NotesController < ApplicationController note.status = "hidden" note.save - add_comment(note, nil, "hidden") + add_comment(note, comment, "hidden") end # Render the result