Allow an optional comment to be given when closing a note
This commit is contained in:
parent
f48d8f41d8
commit
8b917ccd60
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue