OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6c6a5b
)
Uses attributes_for_keys
author
Alex Denisov
<1101.debian@gmail.com>
Sun, 16 Sep 2012 19:44:20 +0000
(22:44 +0300)
committer
Alex Denisov
<1101.debian@gmail.com>
Sun, 16 Sep 2012 19:44:20 +0000
(22:44 +0300)
lib/api/keys.rb
patch
|
blob
|
history
diff --git
a/lib/api/keys.rb
b/lib/api/keys.rb
index
d58c7ca
..
4c30272
100644
(file)
--- a/
lib/api/keys.rb
+++ b/
lib/api/keys.rb
@@
-26,10
+26,8
@@
module Gitlab
# Example Request:
# POST /keys
post do
- key = current_user.keys.new(
- title: params[:title],
- key: params[:key]
- )
+ attrs = attributes_for_keys [:title, :key]
+ key = current_user.keys.new attrs
if key.save
present key, with: Entities::Key
else