From 030bb31ec1a4f3b20f82ed7e4395189ecb8f5345 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 8 Apr 2013 21:29:41 +0100 Subject: [PATCH] Allow a comment to be supplied when hiding a note --- app/controllers/notes_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.43.2