summaryrefslogtreecommitdiff
path: root/lib/api/notes.rb
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-27 18:12:02 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-27 18:12:02 +0100
commitd269d107d86c600ab2add651f47cced8f601ae84 (patch)
tree7ed4d1c587152825272ddae2bc38dcd5e748885b /lib/api/notes.rb
parent3bb342b961f2a02098175e24855ab56fc1785c43 (diff)
downloadgitlab-ce-d269d107d86c600ab2add651f47cced8f601ae84.tar.gz
API: fixed adding a note
Now the correct attribute is checked if it's available or not. Also fixed a test.
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r--lib/api/notes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 759fd3a9819..097cc7ea475 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -93,7 +93,7 @@ module Gitlab
# POST /projects/:id/issues/:noteable_id/notes
# POST /projects/:id/snippets/:noteable_id/notes
post ":id/#{noteables_str}/:#{noteable_id_str}/notes" do
- required_attributes! [:"#{noteable_id_str}"]
+ required_attributes! [:body]
@noteable = user_project.send(:"#{noteables_str}").find(params[:"#{noteable_id_str}"])
@note = @noteable.notes.new(note: params[:body])