diff options
author | Stan Hu <stanhu@gmail.com> | 2016-12-16 23:54:43 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-12-16 23:54:43 +0000 |
commit | 8592f10a306c3dfc98f17cf910420f159093fbec (patch) | |
tree | 46cfb1f951ef3c7683926fe8ccb5ad534e924bfe | |
parent | a22be3065dc9c80d3a18ca81eda480b9c39e35a6 (diff) | |
parent | 34ed74fab90904eb77c8b07779401650684af5b1 (diff) | |
download | gitlab-ce-8592f10a306c3dfc98f17cf910420f159093fbec.tar.gz |
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.rb | 2 |
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(' ') |