Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JeSuisUnCaillou committed Jan 21, 2025
1 parent e423b34 commit 9b8d41a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/reopen_authorizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b8d41a

Please sign in to comment.