Avoid use of Hash#dig to keep compatibility with Ruby 2.1

This commit is contained in:
Douglas Barbosa Alexandre 2016-12-16 19:59:53 -02:00
parent b1120fc3e7
commit 34ed74fab9
1 changed files with 1 additions and 1 deletions

View File

@ -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(' ')