From 8c375d8a5c899b735950a7a88670a1bb2b7adcd2 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 5 Jul 2024 04:57:54 -0400 Subject: [PATCH] Use `scope module: ...` for settings/2FA routes (#30919) --- config/routes/settings.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/routes/settings.rb b/config/routes/settings.rb index 888fa9ecb5..b14606656b 100644 --- a/config/routes/settings.rb +++ b/config/routes/settings.rb @@ -37,13 +37,13 @@ namespace :settings do end end - resource :otp_authentication, only: [:show, :create], controller: 'two_factor_authentication/otp_authentication' + scope module: :two_factor_authentication do + resource :otp_authentication, only: [:show, :create], controller: :otp_authentication - resources :webauthn_credentials, only: [:index, :new, :create, :destroy], - path: 'security_keys', - controller: 'two_factor_authentication/webauthn_credentials' do - collection do - get :options + resources :webauthn_credentials, only: [:index, :new, :create, :destroy], path: 'security_keys' do + collection do + get :options + end end end