diff --git a/app/controllers/instruction/cancel_authorization_reopenings_controller.rb b/app/controllers/instruction/cancel_authorization_reopenings_controller.rb index 8e48c7b7d..bf62f716d 100644 --- a/app/controllers/instruction/cancel_authorization_reopenings_controller.rb +++ b/app/controllers/instruction/cancel_authorization_reopenings_controller.rb @@ -23,8 +23,8 @@ def create private def authorization_request_reopening_cancellation_params - params.require(:authorization_request_reopening_cancellation).permit( - :reason, + params.expect( + authorization_request_reopening_cancellation: [:reason], ) end diff --git a/app/controllers/instruction/messages_controller.rb b/app/controllers/instruction/messages_controller.rb index 8adb1a38f..04a40308a 100644 --- a/app/controllers/instruction/messages_controller.rb +++ b/app/controllers/instruction/messages_controller.rb @@ -34,8 +34,8 @@ def create private def message_params - params.require(:message).permit( - :body, + params.expect( + message: [:body], ) end diff --git a/app/controllers/instruction/refuse_authorization_requests_controller.rb b/app/controllers/instruction/refuse_authorization_requests_controller.rb index 24e935c14..0d9dd1d90 100644 --- a/app/controllers/instruction/refuse_authorization_requests_controller.rb +++ b/app/controllers/instruction/refuse_authorization_requests_controller.rb @@ -23,8 +23,8 @@ def create private def denial_of_authorization_params - params.require(:denial_of_authorization).permit( - :reason, + params.expect( + denial_of_authorization: [:reason], ) end diff --git a/app/controllers/instruction/request_changes_on_authorization_requests_controller.rb b/app/controllers/instruction/request_changes_on_authorization_requests_controller.rb index ba6f08253..2e1e206aa 100644 --- a/app/controllers/instruction/request_changes_on_authorization_requests_controller.rb +++ b/app/controllers/instruction/request_changes_on_authorization_requests_controller.rb @@ -25,8 +25,8 @@ def create private def instructor_modification_request_params - params.require(:instructor_modification_request).permit( - :reason, + params.expect( + instructor_modification_request: [:reason], ) end diff --git a/app/controllers/instruction/revoke_authorization_requests_controller.rb b/app/controllers/instruction/revoke_authorization_requests_controller.rb index a576446b8..e5a5755fd 100644 --- a/app/controllers/instruction/revoke_authorization_requests_controller.rb +++ b/app/controllers/instruction/revoke_authorization_requests_controller.rb @@ -23,8 +23,8 @@ def create private def revocation_of_authorization_params - params.require(:revocation_of_authorization).permit( - :reason, + params.expect( + revocation_of_authorization: [:reason], ) end diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index f3a80d659..71543f63f 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -41,8 +41,8 @@ def build_models end def message_params - params.require(:message).permit( - :body, + params.expect( + message: [:body], ) end diff --git a/app/controllers/notifications_settings_controller.rb b/app/controllers/notifications_settings_controller.rb index d100326f4..c5f35de94 100644 --- a/app/controllers/notifications_settings_controller.rb +++ b/app/controllers/notifications_settings_controller.rb @@ -8,8 +8,8 @@ def update private def settings_params - params.require(:user).permit( - *notifications_permitted_settings + params.expect( + user: [*notifications_permitted_settings] ) end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a47589119..23c43f544 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,7 +10,7 @@ def provider_logo_image_tag(authorization_definition, options = {}) end def displays_provider_logo? - @authorization_definition.present? && @display_provider_logo_in_header # rubocop:disable Naming/HelperInstanceVariable + @authorization_definition.present? && @display_provider_logo_in_header # rubocop:disable Rails/HelperInstanceVariable end def authorization_request_status_badge(authorization_request, no_icon: false, scope: nil)