diff --git a/app/controllers/reopen_authorizations_controller.rb b/app/controllers/reopen_authorizations_controller.rb index 3e92a7cd8..2ba3d73e8 100644 --- a/app/controllers/reopen_authorizations_controller.rb +++ b/app/controllers/reopen_authorizations_controller.rb @@ -41,10 +41,10 @@ def extract_authorization def extract_authorization_request_class return if params[:authorization_request_class].blank? - request_classes_hash = AuthorizationDefinition.all_request_classes.to_h { |klass| [klass.to_s, klass] } + request_classes_hash = AuthorizationDefinition.all_request_classes.index_by(&:to_s) actual_authorization_request_class = request_classes_hash[params[:authorization_request_class]] - raise ActionController::UnpermittedParameters unless actual_authorization_request_class.present? + raise ActionController::UnpermittedParameters if actual_authorization_request_class.blank? @authorization_request_class = actual_authorization_request_class end