From 4ad1e955eb97f7169bbf87990e72dc8b76019a85 Mon Sep 17 00:00:00 2001
From: Matt Jankowski <matt@jankowski.online>
Date: Tue, 1 Oct 2024 06:02:58 -0400
Subject: [PATCH] Use `module: :users` in routes/admin section (#30767)

---
 config/routes/admin.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/config/routes/admin.rb b/config/routes/admin.rb
index 50c4c10594..3dba6fa5b8 100644
--- a/config/routes/admin.rb
+++ b/config/routes/admin.rb
@@ -144,8 +144,10 @@ namespace :admin do
   end
 
   resources :users, only: [] do
-    resource :two_factor_authentication, only: [:destroy], controller: 'users/two_factor_authentications'
-    resource :role, only: [:show, :update], controller: 'users/roles'
+    scope module: :users do
+      resource :two_factor_authentication, only: [:destroy]
+      resource :role, only: [:show, :update]
+    end
   end
 
   resources :custom_emojis, only: [:index, :new, :create] do