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

parent b1120fc3
......@@ -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(' ')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment