summaryrefslogtreecommitdiff
path: root/lib/api/deploy_keys.rb
diff options
context:
space:
mode:
authorskv <skv-headless@yandex.ru>2014-01-19 22:55:59 +0400
committerskv <skv-headless@yandex.ru>2014-01-19 23:39:56 +0400
commita3f645ef51ec12ce93934b4ddb11313613d8c451 (patch)
treef30e76940e436049aa83a8c60741bc6c2d9b7f44 /lib/api/deploy_keys.rb
parent3fe578a7fdaea8607cf98ffb1878c03fd5ac3649 (diff)
downloadgitlab-ce-a3f645ef51ec12ce93934b4ddb11313613d8c451.tar.gz
Remove deprecated finders
Diffstat (limited to 'lib/api/deploy_keys.rb')
-rw-r--r--lib/api/deploy_keys.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb
index b5997608997..7f5a125038c 100644
--- a/lib/api/deploy_keys.rb
+++ b/lib/api/deploy_keys.rb
@@ -38,14 +38,14 @@ module API
attrs[:key].strip!
# check if key already exist in project
- key = user_project.deploy_keys.find_by_key(attrs[:key])
+ key = user_project.deploy_keys.find_by(key: attrs[:key])
if key
present key, with: Entities::SSHKey
return
end
# Check for available deploy keys in other projects
- key = current_user.accessible_deploy_keys.find_by_key(attrs[:key])
+ key = current_user.accessible_deploy_keys.find_by(key: attrs[:key])
if key
user_project.deploy_keys << key
present key, with: Entities::SSHKey