Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-12-17 02:54:43 +0300
committerStan Hu <stanhu@gmail.com>2016-12-17 02:54:43 +0300
commit8592f10a306c3dfc98f17cf910420f159093fbec (patch)
tree46cfb1f951ef3c7683926fe8ccb5ad534e924bfe
parenta22be3065dc9c80d3a18ca81eda480b9c39e35a6 (diff)
parent34ed74fab90904eb77c8b07779401650684af5b1 (diff)
Merge branch 'fix/keep-compatility-ruby-21' into 'master'
Avoid use of Hash#dig to keep compatibility with Ruby 2.1 See merge request !8153
-rw-r--r--app/controllers/concerns/oauth_applications.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/oauth_applications.rb b/app/controllers/concerns/oauth_applications.rb
index 7210ed3eb32..9849aa93fa6 100644
--- a/app/controllers/concerns/oauth_applications.rb
+++ b/app/controllers/concerns/oauth_applications.rb
@@ -6,7 +6,7 @@ module OauthApplications
end
def prepare_scopes
- scopes = params.dig(:doorkeeper_application, :scopes)
+ scopes = params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
if scopes
params[:doorkeeper_application][:scopes] = scopes.join(' ')