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:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-17 00:59:53 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-17 00:59:53 +0300
commit34ed74fab90904eb77c8b07779401650684af5b1 (patch)
treed22680cfeefe5bad7146a00d9766e5fabb81b8d7 /app/controllers
parentb1120fc3e702daac001d000263eac79f4629b595 (diff)
Avoid use of Hash#dig to keep compatibility with Ruby 2.1
Diffstat (limited to 'app/controllers')
-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(' ')