diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-02 19:11:26 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-02 19:11:26 +0200 |
commit | 4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5 (patch) | |
tree | cf94edeb5c02688e6e07ad8e27ceb1a6345b100c /lib/api/projects.rb | |
parent | 1e8dbd46758d5c9772baf233ebcff889dc742d3d (diff) | |
download | gitlab-ce-4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5.tar.gz |
Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 17008aa6d0f..deac3934d57 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -109,7 +109,7 @@ module API end post do attrs = declared_params(include_missing: false) - attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.has_key?(:jobs_enabled) + attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.key?(:jobs_enabled) project = ::Projects::CreateService.new(current_user, attrs).execute if project.saved? @@ -248,7 +248,7 @@ module API authorize! :rename_project, user_project if attrs[:name].present? authorize! :change_visibility_level, user_project if attrs[:visibility].present? - attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.has_key?(:jobs_enabled) + attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.key?(:jobs_enabled) result = ::Projects::UpdateService.new(user_project, current_user, attrs).execute |