Allow an optional comment to be given when closing a note

This commit is contained in:
Tom Hughes 2012-10-14 12:32:55 +01:00
parent f48d8f41d8
commit 8b917ccd60

View file

@ -131,6 +131,7 @@ class NotesController < ApplicationController
# Extract the arguments # Extract the arguments
id = params[:id].to_i id = params[:id].to_i
comment = params[:text]
name = params[:name] name = params[:name]
# Find the note and check it is valid # Find the note and check it is valid
@ -142,7 +143,7 @@ class NotesController < ApplicationController
Note.transaction do Note.transaction do
@note.close @note.close
add_comment(@note, nil, name, "closed") add_comment(@note, comment, name, "closed")
end end
# Return a copy of the updated note # Return a copy of the updated note