projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4b599e
)
Allow a comment to be supplied when hiding a note
author
Tom Hughes
<tom@compton.nu>
Mon, 8 Apr 2013 20:29:41 +0000
(21:29 +0100)
committer
Tom Hughes
<tom@compton.nu>
Mon, 8 Apr 2013 20:29:41 +0000
(21:29 +0100)
app/controllers/notes_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/notes_controller.rb
b/app/controllers/notes_controller.rb
index db963820363014b107722937ed5ae444e2409614..e79be2e8d31b4605ccaebff60c2a3ca5fa644c42 100644
(file)
--- 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